diff options
author | 2016-03-17 14:54:25 +0100 | |
---|---|---|
committer | 2016-03-17 14:57:38 +0100 | |
commit | eae3aa7301f8efffc4da0a7f067de355c336579d (patch) | |
tree | 59087ff4ba6ecb1f05396bfe40bb34d23061e512 /result_collection_api/resources/handlers.py | |
parent | ec5072c0ccc6648d734226711b43ddb34b2b21af (diff) |
Add scenario and criteria field in the Test result object of the test API
scenario will be used for OPNFV scenario (currently using version field)
criteria will be passed or failed to give an immediate feedback on the test result status
JIRA: FUNCTEST-151
Change-Id: Iff5eb66bbf0cfbaafec0c3a6211031f6eb83c34f
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'result_collection_api/resources/handlers.py')
-rw-r--r-- | result_collection_api/resources/handlers.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/result_collection_api/resources/handlers.py b/result_collection_api/resources/handlers.py index 1f4d0bb..1eda3b0 100644 --- a/result_collection_api/resources/handlers.py +++ b/result_collection_api/resources/handlers.py @@ -510,6 +510,8 @@ class TestResultsHandler(GenericApiHandler): - installer (fuel, ...) - build_tag : Jenkins build tag name - period : x (x last days) + - scenario : the test scenario (previously version) + - criteria : the global criteria status passed or failed :param result_id: Get a result by ID @@ -526,6 +528,8 @@ class TestResultsHandler(GenericApiHandler): version_arg = self.get_query_argument("version", None) installer_arg = self.get_query_argument("installer", None) build_tag_arg = self.get_query_argument("build_tag", None) + scenario_arg = self.get_query_argument("scenario", None) + criteria_arg = self.get_query_argument("criteria", None) period_arg = self.get_query_argument("period", None) # prepare request @@ -549,6 +553,12 @@ class TestResultsHandler(GenericApiHandler): if build_tag_arg is not None: get_request["build_tag"] = build_tag_arg + if scenario_arg is not None: + get_request["scenario"] = scenario_arg + + if criteria_arg is not None: + get_request["criteria_tag"] = criteria_arg + if period_arg is not None: try: period_arg = int(period_arg) |