summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandy <github@anarkystic.com>2010-06-24 04:12:01 +0100
committerandy <github@anarkystic.com>2010-06-24 04:12:01 +0100
commit029a5510f69fa71b1a520cb5e9468b653dcde6dc (patch)
tree829e8bd072c31aaa2c86cc2568a5893c883e7eb6
parent8767608e335752fea4be6bebd6298bb49782f6d6 (diff)
Create DescribeImageAttribute api method
Conflicts: nova/endpoint/cloud.py
-rw-r--r--nova/endpoint/cloud.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/nova/endpoint/cloud.py b/nova/endpoint/cloud.py
index afd48aa14..2eee5cb39 100644
--- a/nova/endpoint/cloud.py
+++ b/nova/endpoint/cloud.py
@@ -593,6 +593,7 @@ class CloudController(object):
return defer.succeed({'imageId': image_id})
+ @rbac.allow('all')
def describe_image_attribute(self, context, image_id, attribute, **kwargs):
if attribute != 'launchPermission':
raise exception.ApiError('attribute not supported: %s' % attribute)
@@ -613,8 +614,8 @@ class CloudController(object):
raise exception.ApiError('attribute not supported: %s' % attribute)
if len(kwargs['user_group']) != 1 and kwargs['user_group'][0] != 'all':
raise exception.ApiError('only group "all" is supported')
- if not operation_type in ['add', 'delete']:
- raise exception.ApiError('operation_type must be add or delete')
+ if not operation_type in ['add', 'remove']:
+ raise exception.ApiError('operation_type must be add or remove')
result = images.modify(context, image_id, operation_type)
return defer.succeed(result)