summaryrefslogtreecommitdiffstats
path: root/nova/auth
diff options
context:
space:
mode:
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):