summaryrefslogtreecommitdiffstats
path: root/nova/auth
diff options
context:
space:
mode:
authorSoren Hansen <soren.hansen@rackspace.com>2010-09-09 12:35:46 +0200
committerSoren Hansen <soren.hansen@rackspace.com>2010-09-09 12:35:46 +0200
commitbd07d6b3b3e9ed3ef3e65e99b628c8b1aaf2f82c (patch)
treedbf10c1cac86e17702155ed61346c560389ea9d0 /nova/auth
parent4da60c687706da55b828411cb912cc38179fffe1 (diff)
Alright, first hole poked all the way through. We can now create security groups and read them back.
Diffstat (limited to 'nova/auth')
-rw-r--r--nova/auth/manager.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/nova/auth/manager.py b/nova/auth/manager.py
index d5fbec7c5..6aa5721c8 100644
--- a/nova/auth/manager.py
+++ b/nova/auth/manager.py
@@ -640,11 +640,17 @@ class AuthManager(object):
with self.driver() as drv:
user_dict = drv.create_user(name, access, secret, admin)
if user_dict:
+ db.security_group_create(context={},
+ values={ 'name' : 'default',
+ 'description' : 'default',
+ 'user_id' : name })
return User(**user_dict)
def delete_user(self, user):
"""Deletes a user"""
with self.driver() as drv:
+ for security_group in db.security_group_get_by_user(context = {}, user_id=user.id):
+ db.security_group_destroy({}, security_group.id)
drv.delete_user(User.safe_id(user))
def generate_key_pair(self, user, key_name):