summaryrefslogtreecommitdiffstats
path: root/utils/test/result_collection_api/common/config.py
diff options
context:
space:
mode:
authorGuy Rodrigue Koffi <koffirodrigue@gmail.com>2015-10-01 10:56:55 +0200
committerGuy Rodrigue Koffi <koffirodrigue@gmail.com>2015-10-08 11:53:34 +0200
commit8afb6df913ce350090b8374b652ac9ca07c0d077 (patch)
treee0258011a85b7823bd82cf701423ac5803bc7530 /utils/test/result_collection_api/common/config.py
parentce7c448901f386b935a0f03d5f17ca6e541b9a49 (diff)
Updates for result_collection_api
- pod identification : RELENG-33 - add filters on results : RELENG-32 / RELENG-31 - fix bugs on db connection Change-Id: Ie720bb8028e5bfabd914c57df323b81d40c47fcd Signed-off-by: Guy Rodrigue Koffi <koffirodrigue@gmail.com>
Diffstat (limited to 'utils/test/result_collection_api/common/config.py')
-rw-r--r--utils/test/result_collection_api/common/config.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/utils/test/result_collection_api/common/config.py b/utils/test/result_collection_api/common/config.py
index a0d0757a5..a62e80593 100644
--- a/utils/test/result_collection_api/common/config.py
+++ b/utils/test/result_collection_api/common/config.py
@@ -47,6 +47,7 @@ class APIConfig:
def __init__(self):
self._default_config_location = "config.ini"
self.mongo_url = None
+ self.mongo_dbname = None
self.api_port = None
self.api_debug_on = None
self._parser = None
@@ -87,13 +88,18 @@ class APIConfig:
# Linking attributes to keys from file with their sections
obj.mongo_url = obj._get_parameter("mongo", "url")
+ obj.mongo_dbname = obj._get_parameter("mongo", "dbname")
+
obj.api_port = obj._get_int_parameter("api", "port")
obj.api_debug_on = obj._get_bool_parameter("api", "debug")
+
return obj
def __str__(self):
return "mongo_url = %s \n" \
+ "mongo_dbname = %s \n" \
"api_port = %s \n" \
"api_debug_on = %s \n" % (self.mongo_url,
+ self.mongo_dbname,
self.api_port,
self.api_debug_on)