summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/router
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2017-10-27 16:28:48 +0800
committerSerena Feng <feng.xiaowei@zte.com.cn>2017-10-27 09:00:26 +0000
commit9db91e3b166f07750a045d5e24f820837f5772b4 (patch)
tree48afa8a00bdb99cc656fc3ad87bbf006a0288a71 /testapi/opnfv_testapi/router
parenta9da6ed15e08b2797f5c794117327d40b46bceae (diff)
divide resources into handlers and models
divide resources into handlers&models put ui handlers into handlers directory put User into user_models.py Change-Id: I3d9e260097205213c3ea8d4eac08b9019e017f71 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'testapi/opnfv_testapi/router')
-rw-r--r--testapi/opnfv_testapi/router/url_mappings.py31
1 files changed, 16 insertions, 15 deletions
diff --git a/testapi/opnfv_testapi/router/url_mappings.py b/testapi/opnfv_testapi/router/url_mappings.py
index ce0a3ee..349d557 100644
--- a/testapi/opnfv_testapi/router/url_mappings.py
+++ b/testapi/opnfv_testapi/router/url_mappings.py
@@ -9,19 +9,19 @@
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
+from opnfv_testapi.handlers import base_handlers
+from opnfv_testapi.handlers import pod_handlers
+from opnfv_testapi.handlers import project_handlers
+from opnfv_testapi.handlers import result_handlers
+from opnfv_testapi.handlers import root_handlers
+from opnfv_testapi.handlers import scenario_handlers
+from opnfv_testapi.handlers import sign_handlers
+from opnfv_testapi.handlers import testcase_handlers
+from opnfv_testapi.handlers import user_handlers
mappings = [
# GET /versions => GET API version
- (r"/versions", handlers.VersionHandler),
+ (r"/versions", base_handlers.VersionHandler),
# few examples:
# GET /api/v1/pods => Get all pods
@@ -74,10 +74,11 @@ mappings = [
tornado.web.StaticFileHandler,
{'path': CONF.ui_static_path}),
- (r'/', root.RootHandler),
- (r'/api/v1/auth/signin', sign.SigninHandler),
- (r'/{}'.format(CONF.lfid_signin_return), sign.SigninReturnHandler),
- (r'/api/v1/auth/signout', sign.SignoutHandler),
- (r'/api/v1/profile', user.UserHandler),
+ (r'/', root_handlers.RootHandler),
+ (r'/api/v1/auth/signin', sign_handlers.SigninHandler),
+ (r'/{}'.format(CONF.lfid_signin_return),
+ sign_handlers.SigninReturnHandler),
+ (r'/api/v1/auth/signout', sign_handlers.SignoutHandler),
+ (r'/api/v1/profile', user_handlers.UserHandler),
]