CORD-1826: Do not perform VTN autoconfig if there are no nodes

Change-Id: I3ddfcd481fa4db73a2fdec6bd6b27cd646c8d165
(cherry picked from commit 579c0039cee77f9657b7f963a3bf7d122c6f4e69)
diff --git a/xos/synchronizer/steps/sync_onos_netcfg.py b/xos/synchronizer/steps/sync_onos_netcfg.py
index f9085ac..e272c9e 100644
--- a/xos/synchronizer/steps/sync_onos_netcfg.py
+++ b/xos/synchronizer/steps/sync_onos_netcfg.py
@@ -20,6 +20,7 @@
 import sys
 import base64
 import json
+from synchronizers.new_base.syncstep import DeferredException
 from synchronizers.new_base.syncstep import SyncStep
 from synchronizers.new_base.modelaccessor import *
 from xos.logger import Logger, logging
@@ -171,6 +172,9 @@
 
             data["apps"]["org.opencord.vtn"]["cordvtn"]["nodes"].append(node_dict)
 
+        if not (data["apps"]["org.opencord.vtn"]["cordvtn"]["nodes"]):
+            raise DeferredException("Waiting for there to be valid nodes")
+
         # Generate apps->org.onosproject.cordvtn->cordvtn->publicGateways
         # Pull the gateway information from Address Pool objects
         for ap in AddressPool.objects.all():