commit | 6bc017c2b15fca491a9a66f9445f38baaa7b1a26 | [log] [tgz] |
---|---|---|
author | Matteo Scandolo <matteo.scandolo@gmail.com> | Thu May 25 18:37:42 2017 -0700 |
committer | Matteo Scandolo <matteo.scandolo@gmail.com> | Fri May 26 16:17:43 2017 -0700 |
tree | 0fee2a5b26f0fc04874fcdc9e3ec62019bd54dd7 | |
parent | 5769d936bccb10cb1a40a30414a88623c7c1e90a [diff] |
[CORD-1358] Replacing config module in settings.py Change-Id: I834e189ac7132f2164277785885ee01078a7aa84
diff --git a/lib/xos-config/xosconfig/config-schema.yaml b/lib/xos-config/xosconfig/config-schema.yaml index 9a6f000..5d30b86 100644 --- a/lib/xos-config/xosconfig/config-schema.yaml +++ b/lib/xos-config/xosconfig/config-schema.yaml
@@ -2,13 +2,20 @@ name: type: str required: True + xos_dir: + type: str database: type: map map: + name: + type: str + required: True username: type: str + required: True password: type: str + required: True logging: type: map map:
diff --git a/lib/xos-config/xosconfig/config.py b/lib/xos-config/xosconfig/config.py index e58477c..608beac 100644 --- a/lib/xos-config/xosconfig/config.py +++ b/lib/xos-config/xosconfig/config.py
@@ -5,7 +5,7 @@ import default from pykwalify.core import Core as PyKwalify -DEFAULT_CONFIG_FILE = "/opt/xos/config.yaml" +DEFAULT_CONFIG_FILE = "/opt/xos/xos_config.yaml" INITIALIZED = False CONFIG = {}
diff --git a/lib/xos-config/xosconfig/default.py b/lib/xos-config/xosconfig/default.py index 221e0e8..eaea40a 100644 --- a/lib/xos-config/xosconfig/default.py +++ b/lib/xos-config/xosconfig/default.py
@@ -1,4 +1,5 @@ DEFAULT_VALUES = { + 'xos_dir': '/opt/xos', 'logging': { 'level': 'info', 'channels': ['file', 'console']