[CORD-3022] Splitting config
Change-Id: Ifae06bbfe45f4dad49fdca644b9dd579c048656a
diff --git a/xos/synchronizer/onos-synchronizer.py b/xos/synchronizer/onos-synchronizer.py
index 5e04fda..337472d 100755
--- a/xos/synchronizer/onos-synchronizer.py
+++ b/xos/synchronizer/onos-synchronizer.py
@@ -21,8 +21,13 @@
import sys
from xosconfig import Config
-config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/onos_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)