diff options
| author | Dan Prince <dan.prince@rackspace.com> | 2011-04-08 09:17:29 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-04-08 09:17:29 +0000 |
| commit | a1452132e87991d924d59b68cebc3ecdce545dcb (patch) | |
| tree | 055eb58098c308726a3957c3634cbda7a62ada68 /nova/api | |
| parent | 94e35cb15f487ab313c403e023ce84b320ab480c (diff) | |
| parent | 7badb6c0278c8cc51fc3e870fd3810ea3706f494 (diff) | |
Update the describe_image_attribute and modify_image_attribute functions
in the EC2 API so they use the top level 'is_public' attribute of image
objects. This brings these functions in line with the base image service.
Added missing EC2 API unit tests for describing and modifying image attributes.
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/ec2/cloud.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index 4ed8a9ecf..651ec47f9 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -984,7 +984,7 @@ class CloudController(object): except exception.NotFound: raise exception.NotFound(_('Image %s not found') % image_id) result = {'imageId': image_id, 'launchPermission': []} - if image['properties']['is_public']: + if image['is_public']: result['launchPermission'].append({'group': 'all'}) return result @@ -1009,7 +1009,7 @@ class CloudController(object): internal_id = image['id'] del(image['id']) - image['properties']['is_public'] = (operation_type == 'add') + image['is_public'] = (operation_type == 'add') return self.image_service.update(context, internal_id, image) def update_image(self, context, image_id, **kwargs): |
