fix bugs
diff --git a/planetstack/observer/deleters/site_deleter.py b/planetstack/observer/deleters/site_deleter.py
index 468dfe8..17619c5 100644
--- a/planetstack/observer/deleters/site_deleter.py
+++ b/planetstack/observer/deleters/site_deleter.py
@@ -9,7 +9,7 @@
site_deployments = SiteDeployments.objects.filter(site=site)
for site_deployment in site_deployments:
if site_deployment.tenant_id:
- driver = self.driver.admin_driver(deployment=site_deployment.deployment.name
+ driver = self.driver.admin_driver(deployment=site_deployment.deployment.name)
driver.delete_tenant(site_deployment.tenant_id)
site_deployment.delete()
site.delete()
diff --git a/planetstack/observer/deleters/slice_deleter.py b/planetstack/observer/deleters/slice_deleter.py
index d007a68..33985fb 100644
--- a/planetstack/observer/deleters/slice_deleter.py
+++ b/planetstack/observer/deleters/slice_deleter.py
@@ -2,10 +2,10 @@
from observer.deleter import Deleter
class SliceDeleter(Deleter):
- model='Slice'
+ model='Slice'
- def call(self, pk):
- slice = Slice.objects.get(pk=pk)
+ def call(self, pk):
+ slice = Slice.objects.get(pk=pk)
slice_deployments = SliceDeployments.objects.filter(slice=slice)
for slice_deployment in slice_deployments:
user = User.get(user=slice.creator)
diff --git a/planetstack/observer/steps/garbage_collector.py b/planetstack/observer/steps/garbage_collector.py
index 34ecd77..717f35c 100644
--- a/planetstack/observer/steps/garbage_collector.py
+++ b/planetstack/observer/steps/garbage_collector.py
@@ -88,7 +88,7 @@
def gc_users(self):
"""
- Remove users that no don't exist in openstack db if they have an
+ Remove users that do not exist in openstack db if they have an
enacted time (enacted != None).
"""
# get all users that where enacted != null. We can assume these users
diff --git a/planetstack/observer/steps/sync_site_privileges.py b/planetstack/observer/steps/sync_site_privileges.py
index cf838cf..b57ae43 100644
--- a/planetstack/observer/steps/sync_site_privileges.py
+++ b/planetstack/observer/steps/sync_site_privileges.py
@@ -25,7 +25,7 @@
user_deployments = UserDeployments.objects.filter(deployment=site_deployment.deployment)
if user_deployments:
kuser_id = user_deployments[0].kuser_id
- driver = self.driver.admin_driver(deployment=site_deployment.name)
+ driver = self.driver.admin_driver(deployment=site_deployment.deployment.name)
driver.add_user_role(kuser_id,
site_deployment.tenant_id,
- slice_memb.role.role)
+ site_priv.role.role)
diff --git a/planetstack/observer/steps/sync_slice_memberships.py b/planetstack/observer/steps/sync_slice_memberships.py
index 6def794..08b7b6a 100644
--- a/planetstack/observer/steps/sync_slice_memberships.py
+++ b/planetstack/observer/steps/sync_slice_memberships.py
@@ -25,7 +25,7 @@
user_deployments = UserDeployments.objects.filter(deployment=slice_deployment.deployment)
if user_deployments:
kuser_id = user_deployments[0].kuser_id
- driver = self.driver.admin_driver(deployment=slice_deployment.name)
+ driver = self.driver.admin_driver(deployment=slice_deployment.deployment.name)
driver.add_user_role(kuser_id,
slice_deployment.tenant_id,
slice_memb.role.role)