summaryrefslogtreecommitdiffstats
path: root/utils/test/result_collection_api/opnfv_testapi/resources
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-06-04 16:58:33 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-06-04 16:58:33 +0000
commitf61173ebe98f1c746f7cb7eef439d56590a4b78e (patch)
treebe9963bd4ddaa9d7668f3a03e912860c14f53784 /utils/test/result_collection_api/opnfv_testapi/resources
parenta1034f88ad3bb6a89d25283ae05ff003af90866f (diff)
parent67ce8e57e4400f6734a999b40ccd8c3f6a489094 (diff)
Merge "support 'GET /dashboard/v1/projects' REST api in testAPI"
Diffstat (limited to 'utils/test/result_collection_api/opnfv_testapi/resources')
-rw-r--r--utils/test/result_collection_api/opnfv_testapi/resources/dashboard_handlers.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/utils/test/result_collection_api/opnfv_testapi/resources/dashboard_handlers.py b/utils/test/result_collection_api/opnfv_testapi/resources/dashboard_handlers.py
index 84e7bc1b0..303e8d164 100644
--- a/utils/test/result_collection_api/opnfv_testapi/resources/dashboard_handlers.py
+++ b/utils/test/result_collection_api/opnfv_testapi/resources/dashboard_handlers.py
@@ -11,8 +11,8 @@ from tornado.web import HTTPError
from opnfv_testapi.common.constants import HTTP_NOT_FOUND
from opnfv_testapi.dashboard.dashboard_utils import \
- check_dashboard_ready_project, \
- check_dashboard_ready_case, get_dashboard_result
+ check_dashboard_ready_project, check_dashboard_ready_case, \
+ get_dashboard_result, get_dashboard_projects
from opnfv_testapi.resources.result_handlers import GenericResultHandler
from opnfv_testapi.resources.result_models import TestResult
from opnfv_testapi.tornado_swagger import swagger
@@ -107,3 +107,14 @@ class DashboardHandler(GenericDashboardHandler):
return get_dashboard_result(project, case, res)
self._list(self.set_query(), get_result, project_arg, case_arg)
+
+
+class DashboardProjectsHandler(GenericDashboardHandler):
+ @swagger.operation(nickname='list')
+ def get(self):
+ """
+ @description: Retrieve dashboard ready project(s)
+ @rtype: L{list}
+ @return 200: return all dashboard ready project(s)
+ """
+ self.finish_request(get_dashboard_projects())