[CORD-3022] Splitting config and removing unused files
Change-Id: I4d88142896efe3ceff34f0826f36223f29a47687
diff --git a/xos/synchronizer/vhss-synchronizer.py b/xos/synchronizer/vhss-synchronizer.py
index 2d1bb00..2c40aeb 100755
--- a/xos/synchronizer/vhss-synchronizer.py
+++ b/xos/synchronizer/vhss-synchronizer.py
@@ -19,13 +19,17 @@
import importlib
import os
import sys
-
from xosconfig import Config
-config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/vhss_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)
mod = importlib.import_module("xos-synchronizer")
mod.main()