From ded5b51d3c4b93e946de75a12b5d815a385bf84a Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Thu, 28 Jun 2012 16:29:53 +1200 Subject: Fixes bug 1014194, metadata keys are incorrect for kernel-id and ramdisk-id Kernel and ramdisk IDs are using currently being inserted in the metadata using the keys aki-id and ari-id. They should be using the keys kernel-id and ramdisk-id. http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/instancedata-data-categories.html This bug is in a block of code which did not previously have test coverage; this change also adds that coverage. Change-Id: I2ee3663169160c0e351e548d831fef2f34f9f2fd --- nova/api/metadata/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nova/api') diff --git a/nova/api/metadata/base.py b/nova/api/metadata/base.py index 06e290917..582bdec82 100644 --- a/nova/api/metadata/base.py +++ b/nova/api/metadata/base.py @@ -96,9 +96,9 @@ class InstanceMetadata(): for image_type in ['kernel', 'ramdisk']: if self.instance.get('%s_id' % image_type): image_id = self.instance['%s_id' % image_type] - image_type = ec2utils.image_type(image_type) + ec2_image_type = ec2utils.image_type(image_type) ec2_id = ec2utils.glance_id_to_ec2_id(ctxt, image_id, - image_type) + ec2_image_type) self.ec2_ids['%s-id' % image_type] = ec2_id self.address = address -- cgit