Merge "Generalize Gerrit non-voting Review Macro Name"
[releng.git] / utils / test / testapi / opnfv_testapi / router / url_mappings.py
index 94e71c6..a2312de 100644 (file)
@@ -6,17 +6,21 @@
 # which accompanies this distribution, and is available at
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
+import tornado.web
+
+from opnfv_testapi.common import config
 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
-import opnfv_testapi.resources.ui_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
-    (r'/', opnfv_testapi.resources.ui_handlers.UIHandler),
     (r"/versions", handlers.VersionHandler),
 
     # few examples:
@@ -49,4 +53,15 @@ mappings = [
     # scenarios
     (r"/api/v1/scenarios", scenario_handlers.ScenariosCLHandler),
     (r"/api/v1/scenarios/([^/]+)", scenario_handlers.ScenarioGURHandler),
+
+    # static path
+    (r'/(.*\.(css|png|gif|js|html|json|map|woff2|woff|ttf))',
+     tornado.web.StaticFileHandler,
+     {'path': config.Config().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),
 ]