summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorDan Prince <dan.prince@rackspace.com>2011-04-07 23:39:29 -0400
committerDan Prince <dan.prince@rackspace.com>2011-04-07 23:39:29 -0400
commit7badb6c0278c8cc51fc3e870fd3810ea3706f494 (patch)
tree7737af599825441dc5b74b74f9efdcfb40496bfa /nova/api
parent4d8594cd7e36983cb55908ab8bfebe8aa3a40ff1 (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 unit tests on describing and modifying image attributes.
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/ec2/cloud.py4
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):