Switched sync_networks to new style of deletion
diff --git a/planetstack/openstack_observer/steps/sync_networks.py b/planetstack/openstack_observer/steps/sync_networks.py
index 84257f7..5174fe6 100644
--- a/planetstack/openstack_observer/steps/sync_networks.py
+++ b/planetstack/openstack_observer/steps/sync_networks.py
@@ -5,6 +5,7 @@
from observer.openstacksyncstep import OpenStackSyncStep
from core.models.network import *
from util.logger import Logger, logging
+from observer.steps.sync_network_deployments import *
logger = Logger(level=logging.INFO)
@@ -16,10 +17,10 @@
network.save()
def delete_record(self, network):
- network_deployment_deleter = NetworkDeploymentDeleter()
+ network_deployment_deleter = SyncNetworkDeployments().delete_record
for network_deployment in NetworkDeployments.objects.filter(network=network):
try:
- network_deployment_deleter(network_deployment.id)
+ network_deployment_deleter(network_deployment)
except Exeption,e:
logger.log_exc("Failed to delete network deployment %s" % network_deployment)
raise e