summaryrefslogtreecommitdiffstats
path: root/utils/test/result_collection_api/result_collection_api.py
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2016-05-25 22:56:11 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2016-05-26 14:18:08 +0800
commit119faa49c41ab093aaa9767e906b448198e5c6c4 (patch)
treea0733809af20e1dbf35d1ebcf851f2973603b4c2 /utils/test/result_collection_api/result_collection_api.py
parentf41cc29366b2660ef7d9cb85be6b04b737526f45 (diff)
attach version number to url in testAPI
version - /versions api - /api/v1/pods(projects/results) dashboard - /dashboard/v1/results I tried to make the code smart, but in vain, sad...... JIRA: FUNCTEST-261 Change-Id: I3e9e3ad7180a6c6349fd743e24eafea07bdefd1d Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'utils/test/result_collection_api/result_collection_api.py')
-rw-r--r--utils/test/result_collection_api/result_collection_api.py25
1 files changed, 12 insertions, 13 deletions
diff --git a/utils/test/result_collection_api/result_collection_api.py b/utils/test/result_collection_api/result_collection_api.py
index 704d6075c..97aa58c77 100644
--- a/utils/test/result_collection_api/result_collection_api.py
+++ b/utils/test/result_collection_api/result_collection_api.py
@@ -54,25 +54,25 @@ def make_app():
return tornado.web.Application(
[
# GET /version => GET API version
- (r"/version", VersionHandler),
+ (r"/versions", VersionHandler),
# few examples:
# GET /pods => Get all pods
# GET /pods/1 => Get details on POD 1
- (r"/pods", PodHandler),
- (r"/pods/([^/]+)", PodHandler),
+ (r"/api/v1/pods", PodHandler),
+ (r"/api/v1/pods/([^/]+)", PodHandler),
# few examples:
# GET /projects
# GET /projects/yardstick
- (r"/projects", ProjectHandler),
- (r"/projects/([^/]+)", ProjectHandler),
+ (r"/api/v1/projects", ProjectHandler),
+ (r"/api/v1/projects/([^/]+)", ProjectHandler),
# few examples
# GET /projects/qtip/cases => Get cases for qtip
#
- (r"/projects/([^/]+)/cases", TestcaseHandler),
- (r"/projects/([^/]+)/cases/([^/]+)", TestcaseHandler),
+ (r"/api/v1/projects/([^/]+)/cases", TestcaseHandler),
+ (r"/api/v1/projects/([^/]+)/cases/([^/]+)", TestcaseHandler),
# (r"/test_cases/([^/]+)", TestCasesHandler),
# new path to avoid a long depth
@@ -81,18 +81,17 @@ def make_app():
# POST /results =>
# Push results with mandatory request payload parameters
# (project, case, and pod)
- (r"/results", TestResultsHandler),
- (r"/results([^/]*)", TestResultsHandler),
- (r"/results/([^/]*)", TestResultsHandler),
+ (r"/api/v1/results", TestResultsHandler),
+ (r"/api/v1/results([^/]*)", TestResultsHandler),
+ (r"/api/v1/results/([^/]*)", TestResultsHandler),
# Method to manage Dashboard ready results
# GET /dashboard?project=functest&case=vPing&pod=opnfv-jump2
# => get results in dasboard ready format
# get /dashboard
# => get the list of project with dashboard ready results
- (r"/dashboard", DashboardHandler),
- (r"/dashboard([^/]*)", DashboardHandler),
- (r"/dashboard/([^/]*)", DashboardHandler),
+ (r"/dashboard/v1/results", DashboardHandler),
+ (r"/dashboard/v1/results([^/]*)", DashboardHandler),
],
db=db,
debug=CONF.api_debug_on,