From 7ea62897626546d330c3458bba4112f52882f313 Mon Sep 17 00:00:00 2001 From: MotoKen Date: Tue, 24 Jul 2012 16:27:45 +0800 Subject: EC2 DescribeImageAttribute by kernel/ramdisk. Fixes bug 1026898. Supports kernel/ramdisk attributes for EC2 DescribeImageAttribute API to display the ID of the kernel/ramdisk associated with the AMI. And adds test cases to verify this behavior. Change-Id: I3ea91b95812dcec349b4ff6dc889645a57975278 --- nova/tests/api/ec2/test_cloud.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'nova/tests') diff --git a/nova/tests/api/ec2/test_cloud.py b/nova/tests/api/ec2/test_cloud.py index ca2849cdd..04b73adc8 100644 --- a/nova/tests/api/ec2/test_cloud.py +++ b/nova/tests/api/ec2/test_cloud.py @@ -1336,6 +1336,12 @@ class CloudTestCase(test.TestCase): result = describe_image_attribute(self.context, 'ami-00000001', 'launchPermission') self.assertEqual([{'group': 'all'}], result['launchPermission']) + result = describe_image_attribute(self.context, 'ami-00000001', + 'kernel') + self.assertEqual('aki-00000001', result['kernel']['value']) + result = describe_image_attribute(self.context, 'ami-00000001', + 'ramdisk') + self.assertEqual('ari-00000001', result['ramdisk']['value']) def test_describe_image_attribute_root_device_name(self): describe_image_attribute = self.cloud.describe_image_attribute -- cgit