diff options
author | 2015-10-01 10:56:55 +0200 | |
---|---|---|
committer | 2015-10-08 11:53:34 +0200 | |
commit | 5245db0a6cee1b138e9ce6786f191cae01b919ba (patch) | |
tree | 359672d9b798960509a3e8fb05ea9023aad810cf /result_collection_api/common | |
parent | 962f4cadc714ace002b9d0106a30c472fc9bf4b1 (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 'result_collection_api/common')
-rw-r--r-- | result_collection_api/common/config.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/result_collection_api/common/config.py b/result_collection_api/common/config.py index a0d0757..a62e805 100644 --- a/result_collection_api/common/config.py +++ b/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) |