Renamed SliceDeployment back to SliceDeployments
diff --git a/planetstack/openstack_observer/steps/sync_site_deployments.py b/planetstack/openstack_observer/steps/sync_site_deployments.py
index 27b8648..b5e9f9a 100644
--- a/planetstack/openstack_observer/steps/sync_site_deployments.py
+++ b/planetstack/openstack_observer/steps/sync_site_deployments.py
@@ -6,9 +6,9 @@
from core.models.site import *
from observer.ansible import *
-class SyncSiteDeployment(OpenStackSyncStep):
+class SyncSiteDeployments(OpenStackSyncStep):
requested_interval=0
- provides=[SiteDeployment, Site]
+ provides=[SiteDeployments, Site]
def sync_record(self, site_deployment):
diff --git a/planetstack/openstack_observer/steps/sync_site_privileges.py b/planetstack/openstack_observer/steps/sync_site_privileges.py
index 78da7b2..d1a1fed 100644
--- a/planetstack/openstack_observer/steps/sync_site_privileges.py
+++ b/planetstack/openstack_observer/steps/sync_site_privileges.py
@@ -3,7 +3,7 @@
from django.db.models import F, Q
from planetstack.config import Config
from observer.openstacksyncstep import OpenStackSyncStep
-from core.models import User, UserDeployment, SitePrivilege, SiteDeployment
+from core.models import User, UserDeployment, SitePrivilege, SiteDeployments
class SyncSitePrivileges(OpenStackSyncStep):
requested_interval=0
@@ -18,7 +18,7 @@
def sync_record(self, site_priv):
# sync site privileges at all site deployments
- site_deployments = SiteDeployment.objects.filter(site=site_priv.site)
+ site_deployments = SiteDeployments.objects.filter(site=site_priv.site)
for site_deployment in site_deployments:
user_deployments = UserDeployment.objects.filter(deployment=site_deployment.deployment)
if user_deployments:
diff --git a/planetstack/openstack_observer/steps/sync_sites.py b/planetstack/openstack_observer/steps/sync_sites.py
index 4672878..c560a6a 100644
--- a/planetstack/openstack_observer/steps/sync_sites.py
+++ b/planetstack/openstack_observer/steps/sync_sites.py
@@ -14,7 +14,7 @@
site.save()
def delete_record(self, site):
- site_deployments = SiteDeployment.objects.filter(site=site)
- site_deployment_deleter = SyncSiteDeployment().delete_record
+ site_deployments = SiteDeployments.objects.filter(site=site)
+ site_deployment_deleter = SyncSiteDeployments().delete_record
for site_deployment in site_deployments:
site_deployment_deleter(site_deployment)
diff --git a/planetstack/openstack_observer/steps/sync_slice_deployments.py b/planetstack/openstack_observer/steps/sync_slice_deployments.py
index 2bc2082..c08a5fa 100644
--- a/planetstack/openstack_observer/steps/sync_slice_deployments.py
+++ b/planetstack/openstack_observer/steps/sync_slice_deployments.py
@@ -5,7 +5,7 @@
from django.db.models import F, Q
from planetstack.config import Config
from observer.openstacksyncstep import OpenStackSyncStep
-from core.models.site import Deployment, SiteDeployment
+from core.models.site import Deployment, SiteDeployments
from core.models.slice import Slice, SliceDeployment
from core.models.userdeployments import UserDeployment
from util.logger import Logger, logging
diff --git a/planetstack/openstack_observer/steps/sync_user_deployments.py b/planetstack/openstack_observer/steps/sync_user_deployments.py
index 69faa9f..54f6130 100644
--- a/planetstack/openstack_observer/steps/sync_user_deployments.py
+++ b/planetstack/openstack_observer/steps/sync_user_deployments.py
@@ -5,7 +5,7 @@
from django.db.models import F, Q
from planetstack.config import Config
from observer.openstacksyncstep import OpenStackSyncStep
-from core.models.site import SiteDeployment, Deployment
+from core.models.site import SiteDeployments, Deployment
from core.models.user import User
from core.models.userdeployments import UserDeployment
from util.logger import Logger, logging
@@ -39,7 +39,7 @@
roles = []
# setup user deployment home site roles
if user_deployment.user.site:
- site_deployments = SiteDeployment.objects.filter(site=user_deployment.user.site,
+ site_deployments = SiteDeployments.objects.filter(site=user_deployment.user.site,
deployment=user_deployment.deployment)
if site_deployments:
# need the correct tenant id for site at the deployment
@@ -50,7 +50,7 @@
if user_deployment.user.is_admin:
roles.append('admin')
else:
- raise Exception('Internal error. Missing SiteDeployment for user %s'%user_deployment.user.email)
+ raise Exception('Internal error. Missing SiteDeployments for user %s'%user_deployment.user.email)
else:
raise Exception('Siteless user %s'%user_deployment.user.email)