From 67ce8e57e4400f6734a999b40ccd8c3f6a489094 Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Sat, 4 Jun 2016 13:16:21 +0800 Subject: support 'GET /dashboard/v1/projects' REST api in testAPI add get_dashboard_projects() in dashboard_utils.py add DashboardProjectHandler in dashboard_handlers.py add router mapping in url_mappings.py add file test_dashboard_project.py to do the unittest JIRA: FUNCTEST-292 Change-Id: I51ad8dd26abbd8d43c656c8b03ff302227255d11 Signed-off-by: SerenaFeng --- .../opnfv_testapi/dashboard/dashboard_utils.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'utils/test/result_collection_api/opnfv_testapi/dashboard/dashboard_utils.py') diff --git a/utils/test/result_collection_api/opnfv_testapi/dashboard/dashboard_utils.py b/utils/test/result_collection_api/opnfv_testapi/dashboard/dashboard_utils.py index 090aaa5b4..f331e28cd 100644 --- a/utils/test/result_collection_api/opnfv_testapi/dashboard/dashboard_utils.py +++ b/utils/test/result_collection_api/opnfv_testapi/dashboard/dashboard_utils.py @@ -67,6 +67,22 @@ def get_dashboard_cases(): return modules +def get_dashboard_projects(): + # Retrieve all the projects that could provide + # Dashboard ready graphs + # look in the releng repo + # search all the project2Dashboard.py files + # we assume that dashboard processing of project + # is performed in the 2Dashboard.py file + projects = [] + cp = re.compile('opnfv_testapi\.dashboard\.(.+?)2Dashboard') + for module in sys.modules: + project = re.findall(cp, module) + if project: + projects.extend(project) + return projects + + def get_dashboard_result(project, case, results=None): # get the dashboard ready results # paramters are: -- cgit 1.2.3-korg