summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2010-06-24 11:16:11 -0700
committerVishvananda Ishaya <vishvananda@gmail.com>2010-06-24 11:16:11 -0700
commitc3dea0b61fc38e9a42d2d0966afbe5386a9ba2da (patch)
tree53ef5d29009f8b87ec3093b741dd12d279923128
parent4ba6802ae5d6fb4e0d8ed7bbbaf2cca94a6d1118 (diff)
downloadnova-c3dea0b61fc38e9a42d2d0966afbe5386a9ba2da.tar.gz
nova-c3dea0b61fc38e9a42d2d0966afbe5386a9ba2da.tar.xz
nova-c3dea0b61fc38e9a42d2d0966afbe5386a9ba2da.zip
Placeholders for missing describe commands
-rw-r--r--nova/endpoint/cloud.py25
1 files changed, 23 insertions, 2 deletions
diff --git a/nova/endpoint/cloud.py b/nova/endpoint/cloud.py
index d6c164163..992a6a803 100644
--- a/nova/endpoint/cloud.py
+++ b/nova/endpoint/cloud.py
@@ -170,6 +170,28 @@ class CloudController(object):
'zoneState': 'available'}]}
@rbac.allow('all')
+ def describe_regions(self, context, region_name=None, **kwargs):
+ # TODO(vish): region_name is an array. Support filtering
+ return {'regionInfo': [{'regionName': 'nova',
+ 'regionUrl': FLAGS.ec2_url}]}
+
+ @rbac.allow('all')
+ def describe_snapshots(self,
+ context,
+ snapshot_id=None,
+ owner=None,
+ restorable_by=None,
+ **kwargs):
+ return {'snapshotSet': [{'snapshotId': 'fixme',
+ 'volumeId': 'fixme',
+ 'status': 'fixme',
+ 'startTime': 'fixme',
+ 'progress': 'fixme',
+ 'ownerId': 'fixme',
+ 'volumeSize': 0,
+ 'description': 'fixme'}]}
+
+ @rbac.allow('all')
def describe_key_pairs(self, context, key_name=None, **kwargs):
key_pairs = context.user.get_key_pairs()
if not key_name is None:
@@ -609,9 +631,8 @@ class CloudController(object):
result = { 'image_id': image_id, 'launchPermission': [] }
if image['isPublic']:
result['launchPermission'].append({ 'group': 'all' })
-
return defer.succeed(result)
-
+
@rbac.allow('projectmanager', 'sysadmin')
def modify_image_attribute(self, context, image_id, attribute, operation_type, **kwargs):
# TODO(devcamcar): Support users and groups other than 'all'.