diff options
| author | Soren Hansen <soren.hansen@rackspace.com> | 2010-09-09 12:35:46 +0200 |
|---|---|---|
| committer | Soren Hansen <soren.hansen@rackspace.com> | 2010-09-09 12:35:46 +0200 |
| commit | bd07d6b3b3e9ed3ef3e65e99b628c8b1aaf2f82c (patch) | |
| tree | dbf10c1cac86e17702155ed61346c560389ea9d0 /nova/endpoint | |
| parent | 4da60c687706da55b828411cb912cc38179fffe1 (diff) | |
Alright, first hole poked all the way through. We can now create security groups and read them back.
Diffstat (limited to 'nova/endpoint')
| -rw-r--r-- | nova/endpoint/cloud.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/nova/endpoint/cloud.py b/nova/endpoint/cloud.py index 44997be59..7df8bd081 100644 --- a/nova/endpoint/cloud.py +++ b/nova/endpoint/cloud.py @@ -212,10 +212,12 @@ class CloudController(object): return True @rbac.allow('all') - def describe_security_groups(self, context, group_names, **kwargs): - groups = {'securityGroupSet': []} + def describe_security_groups(self, context, **kwargs): + groups = {'securityGroupSet': + [{ 'groupDescription': group.description, + 'groupName' : group.name, + 'ownerId': context.user.id } for group in db.security_group_get_by_user(context, context.user.id) ] } - # Stubbed for now to unblock other things. return groups @rbac.allow('netadmin') @@ -223,7 +225,11 @@ class CloudController(object): return True @rbac.allow('netadmin') - def create_security_group(self, context, group_name, **kwargs): + def create_security_group(self, context, group_name, group_description): + db.security_group_create(context, + values = { 'user_id' : context.user.id, + 'name': group_name, + 'description': group_description }) return True @rbac.allow('netadmin') |
