1 ##############################################################################
2 # Copyright (c) 2015 Orange
3 # guyrodrigue.koffi@orange.com / koffirodrigue@gmail.com
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9 from opnfv_testapi.resources import handlers
10 from opnfv_testapi.resources import pod_handlers
11 from opnfv_testapi.resources import project_handlers
12 from opnfv_testapi.resources import result_handlers
13 from opnfv_testapi.resources import scenario_handlers
14 from opnfv_testapi.resources import testcase_handlers
17 # GET /versions => GET API version
18 (r"/versions", handlers.VersionHandler),
21 # GET /api/v1/pods => Get all pods
22 # GET /api/v1/pods/1 => Get details on POD 1
23 (r"/api/v1/pods", pod_handlers.PodCLHandler),
24 (r"/api/v1/pods/([^/]+)", pod_handlers.PodGURHandler),
28 # GET /projects/yardstick
29 (r"/api/v1/projects", project_handlers.ProjectCLHandler),
30 (r"/api/v1/projects/([^/]+)", project_handlers.ProjectGURHandler),
33 # GET /projects/qtip/cases => Get cases for qtip
34 (r"/api/v1/projects/([^/]+)/cases", testcase_handlers.TestcaseCLHandler),
35 (r"/api/v1/projects/([^/]+)/cases/([^/]+)",
36 testcase_handlers.TestcaseGURHandler),
38 # new path to avoid a long depth
39 # GET /results?project=functest&case=keystone.catalog&pod=1
40 # => get results with optional filters
42 # Push results with mandatory request payload parameters
43 # (project, case, and pod)
44 (r"/api/v1/results", result_handlers.ResultsCLHandler),
45 (r"/api/v1/results/([^/]+)", result_handlers.ResultsGURHandler),
48 (r"/api/v1/scenarios", scenario_handlers.ScenariosCLHandler),
49 (r"/api/v1/scenarios/([^/]+)", scenario_handlers.ScenarioGURHandler),