[CORD-3022] Splitting config and removing unused files
Change-Id: Ibc9b8332d8f51e9d2e9efd13c1a6da77f7b77b5d
diff --git a/xos/synchronizer/vspgwu-synchronizer.py b/xos/synchronizer/vspgwu-synchronizer.py
index e21bee0..76e18bc 100755
--- a/xos/synchronizer/vspgwu-synchronizer.py
+++ b/xos/synchronizer/vspgwu-synchronizer.py
@@ -19,11 +19,16 @@
import importlib
import os
import sys
-
from xosconfig import Config
-config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/vspgwu_config.yaml')
-Config.init(config_file, 'synchronizer-config-schema.yaml')
+base_config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/config.yaml')
+mounted_config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/mounted_config.yaml')
+
+if os.path.isfile(mounted_config_file):
+ Config.init(base_config_file, 'synchronizer-config-schema.yaml', mounted_config_file)
+else:
+ Config.init(base_config_file, 'synchronizer-config-schema.yaml')
+
observer_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../synchronizers/new_base")
sys.path.append(observer_path)