From b898badbbc237cceb8ced9d89f4c53e2df98ee4d Mon Sep 17 00:00:00 2001 From: Eoghan Glynn Date: Sat, 14 Jul 2012 21:30:43 +0100 Subject: EC2 DescribeImages reports correct rootDeviceType Fixes LP 1024354 A root device type of instance-store was incorrectly reported for boot-from-volume images (i.e. the analogue of EBS-backed AMIs). When comparing the block device mapping device name with the root device name, we now tolerate a missing leading '/dev/' path. Change-Id: I1d3bda780deee52f5d41e3af041aba7e6305dfde --- nova/tests/api/ec2/test_cloud.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'nova/tests') diff --git a/nova/tests/api/ec2/test_cloud.py b/nova/tests/api/ec2/test_cloud.py index b1de3c78a..1a0f429cb 100644 --- a/nova/tests/api/ec2/test_cloud.py +++ b/nova/tests/api/ec2/test_cloud.py @@ -2178,6 +2178,7 @@ class CloudTestCase(test.TestCase): delete_on_termination=False)] props = dict(kernel_id='cedef40a-ed67-4d10-800e-17455edce175', ramdisk_id='76fa36fc-c930-4bf3-8c8a-ea2a2420deb6', + root_device_name='/dev/vda', block_device_mapping=bdm) return dict(id=id, properties=props, @@ -2223,6 +2224,7 @@ class CloudTestCase(test.TestCase): 'snap-%08x' % snapshots[0]) self.assertEquals(created_image.get('kernelId'), 'aki-00000001') self.assertEquals(created_image.get('ramdiskId'), 'ari-00000002') + self.assertEquals(created_image.get('rootDeviceType'), 'ebs') self.cloud.terminate_instances(self.context, [ec2_instance_id]) for vol in volumes: -- cgit