diff options
| author | Devin Carlen <devin.carlen@gmail.com> | 2011-02-12 20:58:22 -0800 |
|---|---|---|
| committer | Devin Carlen <devin.carlen@gmail.com> | 2011-02-12 20:58:22 -0800 |
| commit | 07bff0f397b3b6463532f709daeb7a36ed4ad5b1 (patch) | |
| tree | d92aac87831f58ecba9a7f123038ecca191c36cf | |
| parent | 2e75026ef11dfac37f1449a54c0d6f85ff8bfca6 (diff) | |
Made a few tweaks to format of S3 service implementation
| -rw-r--r-- | nova/api/ec2/cloud.py | 8 | ||||
| -rw-r--r-- | nova/image/s3.py | 7 |
2 files changed, 8 insertions, 7 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index b16503589..cc41ed4ae 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -844,9 +844,9 @@ class CloudController(object): i['imageId'] = image.get('id') i['kernelId'] = image.get('kernel_id') i['ramdiskId'] = image.get('ramdisk_id') - i['imageLocation'] = image.get('image_location') - i['imageOwnerId'] = image.get('image_owner_id') - i['imageState'] = image.get('image_state') + i['imageOwnerId'] = image.get('owner_id') + i['imageLocation'] = image.get('location') + i['imageState'] = image.get('status') i['type'] = image.get('type') i['isPublic'] = image.get('is_public') i['architecture'] = image.get('architecture') @@ -856,7 +856,7 @@ class CloudController(object): # NOTE: image_id is a list! images = self.image_service.index(context) if image_id: - images = filter(lambda x: x['imageId'] in image_id, images) + images = filter(lambda x: x['id'] in image_id, images) images = [self._format_image(context, i) for i in images] return {'imagesSet': images} diff --git a/nova/image/s3.py b/nova/image/s3.py index 30a9e2841..ee6b7f0d0 100644 --- a/nova/image/s3.py +++ b/nova/image/s3.py @@ -69,11 +69,12 @@ class S3ImageService(service.BaseImageService): """Convert from S3 format to format defined by BaseImageService.""" i = {} i['id'] = image.get('imageId') + i['name'] = image.get('imageId') i['kernel_id'] = image.get('kernelId') i['ramdisk_id'] = image.get('ramdiskId') - i['image_location'] = image.get('imageLocation') - i['image_owner_id'] = image.get('imageOwnerId') - i['image_state'] = image.get('imageState') + i['location'] = image.get('imageLocation') + i['owner_id'] = image.get('imageOwnerId') + i['status'] = image.get('imageState') i['type'] = image.get('type') i['is_public'] = image.get('isPublic') i['architecture'] = image.get('architecture') |
