summaryrefslogtreecommitdiffstats
path: root/utils/test/result_collection_api/result_collection_api.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/test/result_collection_api/result_collection_api.py')
-rw-r--r--utils/test/result_collection_api/result_collection_api.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/utils/test/result_collection_api/result_collection_api.py b/utils/test/result_collection_api/result_collection_api.py
index 97aa58c77..afd66f3fc 100644
--- a/utils/test/result_collection_api/result_collection_api.py
+++ b/utils/test/result_collection_api/result_collection_api.py
@@ -29,14 +29,16 @@ TODOs :
"""
+import argparse
+
import tornado.ioloop
import motor
-import argparse
-from resources.handlers import VersionHandler, PodHandler, \
+from resources.handlers import VersionHandler, \
ProjectHandler, TestcaseHandler, TestResultsHandler, DashboardHandler
+from resources.pod_handler import PodCLHandler, PodGURHandler
from common.config import APIConfig
-
+from tornado_swagger_ui.tornado_swagger import swagger
# optionally get config file from command line
parser = argparse.ArgumentParser()
@@ -51,16 +53,16 @@ db = client[CONF.mongo_dbname]
def make_app():
- return tornado.web.Application(
+ return swagger.Application(
[
# GET /version => GET API version
(r"/versions", VersionHandler),
# few examples:
- # GET /pods => Get all pods
- # GET /pods/1 => Get details on POD 1
- (r"/api/v1/pods", PodHandler),
- (r"/api/v1/pods/([^/]+)", PodHandler),
+ # GET /api/v1/pods => Get all pods
+ # GET /api/v1/pods/1 => Get details on POD 1
+ (r"/api/v1/pods", PodCLHandler),
+ (r"/api/v1/pods/([^/]+)", PodGURHandler),
# few examples:
# GET /projects
@@ -70,10 +72,8 @@ def make_app():
# few examples
# GET /projects/qtip/cases => Get cases for qtip
- #
(r"/api/v1/projects/([^/]+)/cases", TestcaseHandler),
(r"/api/v1/projects/([^/]+)/cases/([^/]+)", TestcaseHandler),
- # (r"/test_cases/([^/]+)", TestCasesHandler),
# new path to avoid a long depth
# GET /results?project=functest&case=keystone.catalog&pod=1