diff options
author | Dan Prince <dan.prince@rackspace.com> | 2011-02-15 13:50:21 +0000 |
---|---|---|
committer | Tarmac <> | 2011-02-15 13:50:21 +0000 |
commit | af2da1311e21aced75d80c95bffbd26106be90df (patch) | |
tree | f70fcae81ee70750fb2bef400a78005c5b6968cd | |
parent | 0a93ef16bbb999b75a951adb73612338579db954 (diff) | |
parent | f1e536fb296c927a9fc953b1dfe24b9060a0387a (diff) | |
download | nova-af2da1311e21aced75d80c95bffbd26106be90df.tar.gz nova-af2da1311e21aced75d80c95bffbd26106be90df.tar.xz nova-af2da1311e21aced75d80c95bffbd26106be90df.zip |
Fixes issues when running euca-run-instances and euca-describe-image-attribute against the latest nova/trunk EC2 API.
I noticed this late this afternoon and saw some IRC traffic with other users hitting the issue as well.
-rw-r--r-- | nova/api/ec2/cloud.py | 3 | ||||
-rw-r--r-- | nova/compute/api.py | 4 | ||||
-rw-r--r-- | nova/image/s3.py | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index 16a3a4521..6919cd8d2 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -883,6 +883,9 @@ class CloudController(object): % attribute) try: image = self.image_service.show(context, image_id) + image = self._format_image(context, + self.image_service.show(context, + image_id)) except IndexError: raise exception.ApiError(_('invalid id: %s') % image_id) result = {'image_id': image_id, 'launchPermission': []} diff --git a/nova/compute/api.py b/nova/compute/api.py index ac02dbcfa..740dd3935 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -103,9 +103,9 @@ class API(base.Base): if not is_vpn: image = self.image_service.show(context, image_id) if kernel_id is None: - kernel_id = image.get('kernelId', None) + kernel_id = image.get('kernel_id', None) if ramdisk_id is None: - ramdisk_id = image.get('ramdiskId', None) + ramdisk_id = image.get('ramdisk_id', None) # No kernel and ramdisk for raw images if kernel_id == str(FLAGS.null_kernel): kernel_id = None diff --git a/nova/image/s3.py b/nova/image/s3.py index 71304cdd6..14135a1ee 100644 --- a/nova/image/s3.py +++ b/nova/image/s3.py @@ -94,7 +94,7 @@ class S3ImageService(service.BaseImageService): if FLAGS.connection_type == 'fake': return {'imageId': 'bar'} result = self.index(context) - result = [i for i in result if i['imageId'] == image_id] + result = [i for i in result if i['id'] == image_id] if not result: raise exception.NotFound(_('Image %s could not be found') % image_id) |