Switched sync_slices to new style of deletion
diff --git a/planetstack/openstack_observer/steps/sync_slices.py b/planetstack/openstack_observer/steps/sync_slices.py
index c0b8abe..a6073b6 100644
--- a/planetstack/openstack_observer/steps/sync_slices.py
+++ b/planetstack/openstack_observer/steps/sync_slices.py
@@ -6,6 +6,7 @@
from observer.openstacksyncstep import OpenStackSyncStep
from core.models.slice import Slice, SliceDeployments
from util.logger import Logger, logging
+from observer.steps.sync_slice_deployments import *
logger = Logger(level=logging.INFO)
@@ -20,10 +21,10 @@
slice_deployment.save()
def delete_record(self, slice):
- slice_deployment_deleter = SliceDeploymentDeleter()
+ slice_deployment_deleter = SyncSliceDeployments().delete_record
for slice_deployment in SliceDeployments.objects.filter(slice=slice):
try:
- slice_deployment_deleter(slice_deployment.id)
+ slice_deployment_deleter(slice_deployment)
except Exception,e:
logger.log_exc("Failed to delete slice_deployment %s" % slice_deployment)
raise e