[CORD-3022] Splitting config
Change-Id: Ida40f446d26806f2c0f222afe9c444cafa29125c
diff --git a/xos/synchronizer/rcord_config.yaml b/xos/synchronizer/config.yaml
similarity index 83%
rename from xos/synchronizer/rcord_config.yaml
rename to xos/synchronizer/config.yaml
index 3775616..60f9116 100644
--- a/xos/synchronizer/rcord_config.yaml
+++ b/xos/synchronizer/config.yaml
@@ -15,9 +15,6 @@
name: rcord
-accessor:
- username: xosadmin@opencord.org
- password: "@/opt/xos/services/rcord/credentials/xosadmin@opencord.org"
required_models:
- RCORDService
- RCORDSubscriber
@@ -25,3 +22,13 @@
sys_dir: "/opt/xos/synchronizers/rcord/sys"
models_dir: "/opt/xos/synchronizers/rcord/models"
model_policies_dir: "/opt/xos/synchronizers/rcord/model_policies"
+logging:
+ version: 1
+ handlers:
+ console:
+ class: logging.StreamHandler
+ loggers:
+ 'multistructlog':
+ handlers:
+ - console
+ level: DEBUG
diff --git a/xos/synchronizer/rcord-synchronizer.py b/xos/synchronizer/rcord-synchronizer.py
index 4e11e6d..f9ea235 100644
--- a/xos/synchronizer/rcord-synchronizer.py
+++ b/xos/synchronizer/rcord-synchronizer.py
@@ -23,8 +23,13 @@
import sys
from xosconfig import Config
-config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/rcord_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)