summaryrefslogtreecommitdiffstats
path: root/result_collection_api/opnfv_testapi/resources
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2016-09-22 17:10:35 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2016-09-22 17:10:35 +0800
commitf63c33560d084bb2f5bd773bf6e51f3d04e44e64 (patch)
treee2fcfcfc2da8a793ea42cd0890746e0004e5c115 /result_collection_api/opnfv_testapi/resources
parent71edb3b92cbbf4a4f648dc4442efea29b76a157e (diff)
Remove Brhamaputra dashboard process from testapi
Now, ELK is the framework used for dashboarding JIRA: FUNCTEST-489 Change-Id: I51e8bc83e7309a226515f603eb4c468b7e7a69bd Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'result_collection_api/opnfv_testapi/resources')
-rw-r--r--result_collection_api/opnfv_testapi/resources/dashboard_handlers.py120
1 files changed, 0 insertions, 120 deletions
diff --git a/result_collection_api/opnfv_testapi/resources/dashboard_handlers.py b/result_collection_api/opnfv_testapi/resources/dashboard_handlers.py
deleted file mode 100644
index 303e8d1..0000000
--- a/result_collection_api/opnfv_testapi/resources/dashboard_handlers.py
+++ /dev/null
@@ -1,120 +0,0 @@
-##############################################################################
-# Copyright (c) 2015 Orange
-# guyrodrigue.koffi@orange.com / koffirodrigue@gmail.com
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-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, 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
-
-
-class GenericDashboardHandler(GenericResultHandler):
- def __init__(self, application, request, **kwargs):
- super(GenericDashboardHandler, self).__init__(application,
- request,
- **kwargs)
- self.table = self.db_results
- self.table_cls = TestResult
-
-
-class DashboardHandler(GenericDashboardHandler):
- @swagger.operation(nickname='query')
- def get(self):
- """
- @description: Retrieve dashboard ready result(s)
- for a test project
- @notes: Retrieve dashboard ready result(s) for a test project
- Available filters for this request are :
- - project : project name
- - case : case name
- - pod : pod name
- - version : platform version (Arno-R1, ...)
- - installer (fuel, ...)
- - period : x (x last days)
-
- GET /dashboard?project=functest&case=vPing&version=Colorado \
- &pod=pod_name&period=15
- @rtype: L{string}
- @param pod: pod name
- @type pod: L{string}
- @in pod: query
- @required pod: False
- @param project: project name
- @type project: L{string}
- @in project: query
- @required project: True
- @param case: case name
- @type case: L{string}
- @in case: query
- @required case: True
- @param version: i.e. Colorado
- @type version: L{string}
- @in version: query
- @required version: False
- @param installer: fuel/apex/joid/compass
- @type installer: L{string}
- @in installer: query
- @required installer: False
- @param period: last days
- @type period: L{string}
- @in period: query
- @required period: False
- @return 200: test result exist
- @raise 400: period is not in
- @raise 404: project or case name missing,
- or project or case is not dashboard ready
- """
-
- project_arg = self.get_query_argument("project", None)
- case_arg = self.get_query_argument("case", None)
-
- # on /dashboard retrieve the list of projects and testcases
- # ready for dashboard
- if project_arg is None:
- raise HTTPError(HTTP_NOT_FOUND, "Project name missing")
-
- if not check_dashboard_ready_project(project_arg):
- raise HTTPError(HTTP_NOT_FOUND,
- 'Project [{}] not dashboard ready'
- .format(project_arg))
-
- if case_arg is None:
- raise HTTPError(
- HTTP_NOT_FOUND,
- 'Test case missing for project [{}]'.format(project_arg))
-
- if not check_dashboard_ready_case(project_arg, case_arg):
- raise HTTPError(
- HTTP_NOT_FOUND,
- 'Test case [{}] not dashboard ready for project [{}]'
- .format(case_arg, project_arg))
-
- # special case of status for project
- if case_arg == 'status':
- self.finish_request(get_dashboard_result(project_arg, case_arg))
- else:
- def get_result(res, project, case):
- 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())