do not sync objects for deployments that are not configured
diff --git a/planetstack/openstack_observer/steps/sync_network_deployments.py b/planetstack/openstack_observer/steps/sync_network_deployments.py
index 8eecb3b..77d3a3a 100644
--- a/planetstack/openstack_observer/steps/sync_network_deployments.py
+++ b/planetstack/openstack_observer/steps/sync_network_deployments.py
@@ -103,6 +103,10 @@
network_deployment.save()
def sync_record(self, network_deployment):
+ if not network_deployment.deployment.admin_user:
+ logger.info("deployment %r has no admin_user, skipping" % network_deployment.deployment)
+ return
+
if network_deployment.network.owner and network_deployment.network.owner.creator:
try:
# update manager context
diff --git a/planetstack/openstack_observer/steps/sync_slice_deployments.py b/planetstack/openstack_observer/steps/sync_slice_deployments.py
index fff2e04..03ea2ca 100644
--- a/planetstack/openstack_observer/steps/sync_slice_deployments.py
+++ b/planetstack/openstack_observer/steps/sync_slice_deployments.py
@@ -42,6 +42,11 @@
def sync_record(self, slice_deployment):
logger.info("sync'ing slice deployment %s" % slice_deployment)
+
+ if not slice_deployment.deployment.admin_user:
+ logger.info("deployment %r has no admin_user, skipping" % slice_deployment.deployment)
+ return
+
if not slice_deployment.tenant_id:
nova_fields = {'tenant_name': slice_deployment.slice.name,
'description': slice_deployment.slice.description,
diff --git a/planetstack/openstack_observer/steps/sync_user_deployments.py b/planetstack/openstack_observer/steps/sync_user_deployments.py
index 42aae56..43ca260 100644
--- a/planetstack/openstack_observer/steps/sync_user_deployments.py
+++ b/planetstack/openstack_observer/steps/sync_user_deployments.py
@@ -25,6 +25,11 @@
def sync_record(self, user_deployment):
logger.info("sync'ing user %s at deployment %s" % (user_deployment.user, user_deployment.deployment.name))
+
+ if not user_deployment.deployment.admin_user:
+ logger.info("deployment %r has no admin_user, skipping" % user_deployment.deployment)
+ return
+
name = user_deployment.user.email[:user_deployment.user.email.find('@')]
user_fields = {'name': user_deployment.user.email,
'email': user_deployment.user.email,