diff options
author | 2015-10-01 10:56:55 +0200 | |
---|---|---|
committer | 2015-10-08 11:53:34 +0200 | |
commit | 8afb6df913ce350090b8374b652ac9ca07c0d077 (patch) | |
tree | e0258011a85b7823bd82cf701423ac5803bc7530 /utils/test/result_collection_api/result_collection_api.py | |
parent | ce7c448901f386b935a0f03d5f17ca6e541b9a49 (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/result_collection_api.py')
-rw-r--r-- | utils/test/result_collection_api/result_collection_api.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/utils/test/result_collection_api/result_collection_api.py b/utils/test/result_collection_api/result_collection_api.py index c04e0343b..49695772d 100644 --- a/utils/test/result_collection_api/result_collection_api.py +++ b/utils/test/result_collection_api/result_collection_api.py @@ -15,14 +15,12 @@ Pre-requisites: We can launch the API with this file TODOs : - - use POD name instead of id - logging - json args validation with schemes - POST/PUT/DELETE for PODs - POST/PUT/GET/DELETE for installers, platforms (enrich results info) - count cases for GET on test_projects - count results for GET on cases - - provide filtering on requests - include objects - swagger documentation - setup file @@ -48,7 +46,8 @@ args = parser.parse_args() CONF = APIConfig().parse(args.config_file) # connecting to MongoDB server, and choosing database -db = motor.MotorClient(CONF.mongo_url) +client = motor.MotorClient(CONF.mongo_url) +db = client[CONF.mongo_dbname] def make_app(): @@ -61,7 +60,7 @@ def make_app(): # GET /pods => Get all pods # GET /pods/1 => Get details on POD 1 (r"/pods", PodHandler), - (r"/pods/(\d*)", PodHandler), + (r"/pods/([^/]+)", PodHandler), # few examples: # GET /test_projects |