removing plural from model names. some cleanup
diff --git a/planetstack/openstack_observer/steps/sync_site_privileges.py b/planetstack/openstack_observer/steps/sync_site_privileges.py
index 6354d1f..bfc04b3 100644
--- a/planetstack/openstack_observer/steps/sync_site_privileges.py
+++ b/planetstack/openstack_observer/steps/sync_site_privileges.py
@@ -3,9 +3,9 @@
from django.db.models import F, Q
from planetstack.config import Config
from observer.openstacksyncstep import OpenStackSyncStep
-from core.models import User, ControllerUsers, SitePrivilege, SiteDeployments
+from core.models import User, ControllerUser, SitePrivilege, SiteDeployment
-class SyncSitePrivileges(OpenStackSyncStep):
+class SyncSitePrivilege(OpenStackSyncStep):
requested_interval=0
provides=[SitePrivilege]
@@ -18,9 +18,9 @@
def sync_record(self, site_priv):
# sync site privileges at all site controllers
- ctrl_site_deployments = SiteDeployments.objects.filter(site_deployment__site=site_priv.site)
+ ctrl_site_deployments = SiteDeployment.objects.filter(site_deployment__site=site_priv.site)
for ctrl_site_deployment in ctrl_site_deployments:
- controller_users = ControllerUsers.objects.filter(controller=ctrl_site_deployment.controller,
+ controller_users = ControllerUser.objects.filter(controller=ctrl_site_deployment.controller,
user=site_priv.user)
if controller_users:
kuser_id = controller_users[0].kuser_id