summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorSteve Baker <steve@stevebaker.org>2012-06-28 16:29:53 +1200
committerSteve Baker <steve@stevebaker.org>2012-06-29 10:04:48 +1200
commitded5b51d3c4b93e946de75a12b5d815a385bf84a (patch)
tree0839cb72749e5a30acfa42cf4edbdd34bd9b4612 /nova/api
parentb38840fdbd6d8d9e7da46ba91b40d20048b3fa2d (diff)
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
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/metadata/base.py4
1 files changed, 2 insertions, 2 deletions
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