use slicename attribute as slice's keystone tenant name
diff --git a/planetstack/core/admin.py b/planetstack/core/admin.py
index 9f8fbb0..dddebbf 100644
--- a/planetstack/core/admin.py
+++ b/planetstack/core/admin.py
@@ -826,14 +826,14 @@
def save_model(self, request, obj, form, change):
# update openstack connection to use this site/tenant
auth = request.session.get('auth', {})
- auth['tenant'] = obj.slice.name
+ auth['tenant'] = obj.slice.slicename
obj.os_manager = OpenStackManager(auth=auth, caller=request.user)
obj.save()
def delete_model(self, request, obj):
# update openstack connection to use this site/tenant
auth = request.session.get('auth', {})
- auth['tenant'] = obj.slice.name
+ auth['tenant'] = obj.slice.slicename
obj.os_manager = OpenStackManager(auth=auth, caller=request.user)
obj.delete()