summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/cmd/server.py
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2017-07-14 19:27:44 +0800
committerSerena Feng <feng.xiaowei@zte.com.cn>2017-07-21 13:34:38 +0000
commit08014f8dea875cdfaf4afbaa80fb26073708327a (patch)
treecbbf7d6f02d52179453d44cc49ccb48fa32adf67 /testapi/opnfv_testapi/cmd/server.py
parentc0c8260d5b59bc697573c862cc292c1e5f95d1e9 (diff)
separate db methods from handler.py
db methods are mingled in handler, which is not well structured Change-Id: I639679d3fc05a0b6528158186b8bf89e0cd10596 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'testapi/opnfv_testapi/cmd/server.py')
-rw-r--r--testapi/opnfv_testapi/cmd/server.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/testapi/opnfv_testapi/cmd/server.py b/testapi/opnfv_testapi/cmd/server.py
index e640d5f..a5ac5eb 100644
--- a/testapi/opnfv_testapi/cmd/server.py
+++ b/testapi/opnfv_testapi/cmd/server.py
@@ -29,7 +29,6 @@ TODOs :
"""
-import motor
import tornado.ioloop
from opnfv_testapi.common.config import CONF
@@ -37,16 +36,11 @@ from opnfv_testapi.router import url_mappings
from opnfv_testapi.tornado_swagger import swagger
-def get_db():
- return motor.MotorClient(CONF.mongo_url)[CONF.mongo_dbname]
-
-
def make_app():
swagger.docs(base_url=CONF.swagger_base_url,
static_path=CONF.static_path)
return swagger.Application(
url_mappings.mappings,
- db=get_db(),
debug=CONF.api_debug,
auth=CONF.api_authenticate,
cookie_secret='opnfv-testapi',