CORD-2307: Query service graph with missing links

Change-Id: I472a683f9a52a88c5efa2099cf095fd164a2f35e
(cherry picked from commit 719de8a5fd13470bb8137d86f9e0af029a6b5a71)
diff --git a/xos/synchronizer/steps/sync_vspgwutenant.py b/xos/synchronizer/steps/sync_vspgwutenant.py
index ce7797a..877505d 100644
--- a/xos/synchronizer/steps/sync_vspgwutenant.py
+++ b/xos/synchronizer/steps/sync_vspgwutenant.py
@@ -21,6 +21,8 @@
 parentdir = os.path.join(os.path.dirname(__file__), "..")
 sys.path.insert(0, parentdir)
 
+class ServiceGraphException(Exception):
+    pass
 
 class SyncVSPGWUTenant(SyncInstanceUsingAnsible):
     observes = VSPGWUTenant
@@ -186,8 +188,9 @@
         return fields
 
     def has_instance(self, sitype, o):
-        i = self.get_peer_serviceinstance_of_type(sitype, o)
-        if not i:
+        try:
+            i = self.get_peer_serviceinstance_of_type(sitype, o)
+        except ServiceGraphException:
             self.log.info("Missing in ServiceInstance graph",
                           serviceinstance=sitype)
             return False
@@ -242,7 +245,7 @@
             except StopIteration:
                 self.log.error(
                     'Could not find service type in service graph', service_type=sitype, object=o)
-                raise Exception(
+                raise ServiceGraphException(
                     "Synchronization failed due to incomplete service graph")
 
         return peer_service