X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=utils%2Ftest%2Ftestapi%2Fopnfv_testapi%2Frouter%2Furl_mappings.py;h=4f990f03ea3cfa82a77eef3347a551c57f954b39;hb=1df451788541046609e2bdda1b395b4109e8ca70;hp=39cf006af4443c180dac5c5b999924a38f1d5643;hpb=33cb78090b76dfe17891eae0c45aeb246f1fa12e;p=releng.git diff --git a/utils/test/testapi/opnfv_testapi/router/url_mappings.py b/utils/test/testapi/opnfv_testapi/router/url_mappings.py index 39cf006af..4f990f03e 100644 --- a/utils/test/testapi/opnfv_testapi/router/url_mappings.py +++ b/utils/test/testapi/opnfv_testapi/router/url_mappings.py @@ -6,12 +6,18 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +import tornado.web + +from opnfv_testapi.common.config import CONF from opnfv_testapi.resources import handlers from opnfv_testapi.resources import pod_handlers from opnfv_testapi.resources import project_handlers from opnfv_testapi.resources import result_handlers from opnfv_testapi.resources import scenario_handlers from opnfv_testapi.resources import testcase_handlers +from opnfv_testapi.ui import root +from opnfv_testapi.ui.auth import sign +from opnfv_testapi.ui.auth import user mappings = [ # GET /versions => GET API version @@ -42,9 +48,24 @@ mappings = [ # Push results with mandatory request payload parameters # (project, case, and pod) (r"/api/v1/results", result_handlers.ResultsCLHandler), + (r'/api/v1/results/upload', result_handlers.ResultsUploadHandler), (r"/api/v1/results/([^/]+)", result_handlers.ResultsGURHandler), # scenarios (r"/api/v1/scenarios", scenario_handlers.ScenariosCLHandler), (r"/api/v1/scenarios/([^/]+)", scenario_handlers.ScenarioGURHandler), + (r"/api/v1/scenarios/([^/]+)/scores", + scenario_handlers.ScenarioScoresHandler), + + # static path + (r'/(.*\.(css|png|gif|js|html|json|map|woff2|woff|ttf))', + tornado.web.StaticFileHandler, + {'path': CONF.static_path}), + + (r'/', root.RootHandler), + (r'/api/v1/auth/signin', sign.SigninHandler), + (r'/api/v1/auth/signin_return', sign.SigninReturnHandler), + (r'/api/v1/auth/signout', sign.SignoutHandler), + (r'/api/v1/profile', user.ProfileHandler), + ]