Renamed SliceDeployments --> SliceDeployment
diff --git a/planetstack/openstack_observer/steps/sync_slice_deployments.py b/planetstack/openstack_observer/steps/sync_slice_deployments.py
index 97196d6..d7282c6 100644
--- a/planetstack/openstack_observer/steps/sync_slice_deployments.py
+++ b/planetstack/openstack_observer/steps/sync_slice_deployments.py
@@ -5,23 +5,23 @@
from django.db.models import F, Q
from planetstack.config import Config
from observer.openstacksyncstep import OpenStackSyncStep
-from core.models.site import Deployment, SiteDeployments
-from core.models.slice import Slice, SliceDeployments
-from core.models.userdeployments import UserDeployments
+from core.models.site import Deployment, SiteDeployment
+from core.models.slice import Slice, SliceDeployment
+from core.models.userdeployments import UserDeployment
from util.logger import Logger, logging
from observer.ansible import *
logger = Logger(level=logging.INFO)
-class SyncSliceDeployments(OpenStackSyncStep):
- provides=[SliceDeployments]
+class SyncSliceDeployment(OpenStackSyncStep):
+ provides=[SliceDeployment]
requested_interval=0
def fetch_pending(self, deleted):
if (deleted):
- return SliceDeployments.deleted_objects.all()
+ return SliceDeployment.deleted_objects.all()
else:
- return SliceDeployments.objects.filter(Q(enacted__lt=F('updated')) | Q(enacted=None))
+ return SliceDeployment.objects.filter(Q(enacted__lt=F('updated')) | Q(enacted=None))
def get_next_subnet(self, deployment=None):
# limit ourself to 10.0.x.x for now
diff --git a/planetstack/openstack_observer/steps/sync_slice_memberships.py b/planetstack/openstack_observer/steps/sync_slice_memberships.py
index b1cd223..9b7b40b 100644
--- a/planetstack/openstack_observer/steps/sync_slice_memberships.py
+++ b/planetstack/openstack_observer/steps/sync_slice_memberships.py
@@ -22,11 +22,11 @@
def sync_record(self, slice_memb):
# sync slice memberships at all slice deployments
logger.info("syncing slice privilege: %s %s" % (slice_memb.slice.name, slice_memb.user.email))
- slice_deployments = SliceDeployments.objects.filter(slice=slice_memb.slice)
+ slice_deployments = SliceDeployment.objects.filter(slice=slice_memb.slice)
for slice_deployment in slice_deployments:
if not slice_deployment.tenant_id:
continue
- user_deployments = UserDeployments.objects.filter(deployment=slice_deployment.deployment,
+ user_deployments = UserDeployment.objects.filter(deployment=slice_deployment.deployment,
user=slice_memb.user)
if user_deployments:
kuser_id = user_deployments[0].kuser_id
diff --git a/planetstack/openstack_observer/steps/sync_slices.py b/planetstack/openstack_observer/steps/sync_slices.py
index a6073b6..1b89ecd 100644
--- a/planetstack/openstack_observer/steps/sync_slices.py
+++ b/planetstack/openstack_observer/steps/sync_slices.py
@@ -15,14 +15,14 @@
requested_interval=0
def sync_record(self, slice):
- for slice_deployment in SliceDeployments.objects.filter(slice=slice):
+ for slice_deployment in SliceDeployment.objects.filter(slice=slice):
# bump the 'updated' timestamp and trigger observer to update
# slice across all deployments
slice_deployment.save()
def delete_record(self, slice):
- slice_deployment_deleter = SyncSliceDeployments().delete_record
- for slice_deployment in SliceDeployments.objects.filter(slice=slice):
+ slice_deployment_deleter = SyncSliceDeployment().delete_record
+ for slice_deployment in SliceDeployment.objects.filter(slice=slice):
try:
slice_deployment_deleter(slice_deployment)
except Exception,e:
diff --git a/planetstack/openstack_observer/steps/sync_slivers.py b/planetstack/openstack_observer/steps/sync_slivers.py
index 8237896..133c0e0 100644
--- a/planetstack/openstack_observer/steps/sync_slivers.py
+++ b/planetstack/openstack_observer/steps/sync_slivers.py
@@ -4,7 +4,7 @@
from planetstack.config import Config
from observer.openstacksyncstep import OpenStackSyncStep
from core.models.sliver import Sliver
-from core.models.slice import Slice, SlicePrivilege, SliceDeployments
+from core.models.slice import Slice, SlicePrivilege, SliceDeployment
from core.models.network import Network, NetworkSlice, NetworkDeployments
from util.logger import Logger, logging
from observer.ansible import *