CORD-830 do not query VTN for servicenetwork that will be skipped
Change-Id: Id85b07aff84df90aa6cc342472d58564b611f81e
diff --git a/xos/synchronizer/steps/sync_vtn_service.py b/xos/synchronizer/steps/sync_vtn_service.py
index 6ec5610..fe18b43 100644
--- a/xos/synchronizer/steps/sync_vtn_service.py
+++ b/xos/synchronizer/steps/sync_vtn_service.py
@@ -134,15 +134,15 @@
if not network.id:
continue
+ if (network.type=="PRIVATE") and (not network.providerNetworks):
+ logger.info("Skipping network %s because it has no relevant state" % network.id)
+ continue
+
valid_ids.append(network.id)
if (glo_saved_networks.get(network.id, None) != network.to_dict()):
(exists, url, method, req_func) = self.get_method("http://" + self.get_vtn_addr() + ":" + self.get_vtn_port() + "/onos/cordvtn/serviceNetworks", network.id)
- if (network.type=="PRIVATE") and (not network.providerNetworks):
- logger.info("Skipping network %s because it has no relevant state" % network.id)
- continue
-
logger.info("%sing VTN API for network %s" % (method, network.id))
logger.info("URL: %s" % url)