drop support for V1 VTN API
Change-Id: I87e91785edc7890aeda6c078a80c6c05ab6af66b
diff --git a/xos/synchronizer/steps/sync_port_addresses.py b/xos/synchronizer/steps/sync_port_addresses.py
index 37d8dc6..b3a7837 100644
--- a/xos/synchronizer/steps/sync_port_addresses.py
+++ b/xos/synchronizer/steps/sync_port_addresses.py
@@ -39,6 +39,8 @@
if vtn_service.vtnAPIVersion >= 2:
logger.info("skipping SyncPortAddresses due to VTN API Version")
return
+ else:
+ raise Exception("VTN API Version 1 is no longer supported by VTN Synchronizer")
# build up a dictionary of port-->[wan_addrs] mappings
port_addrs = {}
diff --git a/xos/synchronizer/steps/sync_vtn_service.py b/xos/synchronizer/steps/sync_vtn_service.py
index 112fc5a..97f0db6 100644
--- a/xos/synchronizer/steps/sync_vtn_service.py
+++ b/xos/synchronizer/steps/sync_vtn_service.py
@@ -221,6 +221,7 @@
else:
# default to legacy
logger.info("Using Old API")
- self.sync_legacy_vtn_api()
+ raise Exception("VTN API Version 1 is no longer supported by VTN Synchronizer")
+ #self.sync_legacy_vtn_api()
diff --git a/xos/synchronizer/vtn-synchronizer.py b/xos/synchronizer/vtn-synchronizer.py
index 3c99763..e162e18 100755
--- a/xos/synchronizer/vtn-synchronizer.py
+++ b/xos/synchronizer/vtn-synchronizer.py
@@ -9,11 +9,13 @@
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "xos.settings")
-import synchronizers.base.event_loop
-if hasattr(synchronizers.base.event_loop, "set_driver"):
- # VTN synchronizer needs the OpenStack driver
- from openstack_xos.driver import OpenStackDriver
- synchronizers.base.event_loop.set_driver(OpenStackDriver())
+# Legacy code to support VTN API version 1.
+
+# import synchronizers.base.event_loop
+# if hasattr(synchronizers.base.event_loop, "set_driver"):
+# # VTN synchronizer needs the OpenStack driver
+# from openstack_xos.driver import OpenStackDriver
+# synchronizers.base.event_loop.set_driver(OpenStackDriver())
mod = importlib.import_module("synchronizers.base.xos-synchronizer")
mod.main()