Updates to that S3ImageService kernel_id and ramdisk_id mappings work with
EC2 API.
This commit is contained in:
parent
0a93ef16bb
commit
f1e536fb29
@ -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': []}
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user