[CORD-3022] Splitting config
Change-Id: If53017fb35e41ea0536afa14369bd525549c019c
diff --git a/xos/synchronizer/vtn_config.yaml b/xos/synchronizer/config.yaml
similarity index 84%
rename from xos/synchronizer/vtn_config.yaml
rename to xos/synchronizer/config.yaml
index 490b79e..46d868f 100644
--- a/xos/synchronizer/vtn_config.yaml
+++ b/xos/synchronizer/config.yaml
@@ -15,9 +15,6 @@
name: vtn
-accessor:
- username: xosadmin@opencord.org
- password: "@/opt/xos/services/vtn/credentials/xosadmin@opencord.org"
required_models:
- AddressPool
- Controller
@@ -32,3 +29,13 @@
steps_dir: "/opt/xos/synchronizers/vtn/steps"
sys_dir: "/opt/xos/synchronizers/vtn/sys"
models_dir: "/opt/xos/synchronizers/vtn/models"
+logging:
+ version: 1
+ handlers:
+ console:
+ class: logging.StreamHandler
+ loggers:
+ 'multistructlog':
+ handlers:
+ - console
+ level: DEBUG
diff --git a/xos/synchronizer/vtn-synchronizer.py b/xos/synchronizer/vtn-synchronizer.py
index e1126e5..e9b9c98 100755
--- a/xos/synchronizer/vtn-synchronizer.py
+++ b/xos/synchronizer/vtn-synchronizer.py
@@ -21,8 +21,13 @@
import sys
from xosconfig import Config
-config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/vtn_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')
sys.path.append('/opt/xos')