summaryrefslogtreecommitdiffstats
path: root/nova/tests
diff options
context:
space:
mode:
authorEoghan Glynn <eglynn@redhat.com>2012-07-14 21:30:43 +0100
committerEoghan Glynn <eglynn@redhat.com>2012-07-17 18:29:22 +0100
commitb898badbbc237cceb8ced9d89f4c53e2df98ee4d (patch)
tree7ab32eaa45f5ea175fe1347e1ac04d1f035d363d /nova/tests
parent8600394ec4dd4f800d774e4ed0c24fe087d8e1d3 (diff)
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
Diffstat (limited to 'nova/tests')
-rw-r--r--nova/tests/api/ec2/test_cloud.py2
1 files changed, 2 insertions, 0 deletions
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: