summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/ui
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2017-07-13 20:09:10 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2017-07-20 15:18:08 +0800
commit8ec6f1e7d682a56c122f930febb28da1575b8ff8 (patch)
tree5881548d80d23caf66bab8e6ea810cd1884dbc54 /testapi/opnfv_testapi/ui
parentcf402a2a6888ade5c57165dc978a59d2330307a7 (diff)
decouple the mutual-dependence of config.py and server.py
Currently server.py relies on CONF while starting the service, and config.py's config_fie is set in server.py, which is wrongly bi-depended this patch aims to let Config parse the sys.argv personally, just as oslo.config do, so that decouple the mutual-dependency Change-Id: I46887d122a98d478caebe9eeb7ab038941ce1f6b Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'testapi/opnfv_testapi/ui')
-rw-r--r--testapi/opnfv_testapi/ui/auth/sign.py4
-rw-r--r--testapi/opnfv_testapi/ui/root.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/testapi/opnfv_testapi/ui/auth/sign.py b/testapi/opnfv_testapi/ui/auth/sign.py
index 5b36225..13762c9 100644
--- a/testapi/opnfv_testapi/ui/auth/sign.py
+++ b/testapi/opnfv_testapi/ui/auth/sign.py
@@ -3,11 +3,11 @@ from tornado import gen
from tornado import web
import logging
-from opnfv_testapi.common import config
+from opnfv_testapi.common.config import CONF
from opnfv_testapi.ui.auth import base
from opnfv_testapi.ui.auth import constants as const
-CONF = config.Config()
+# CONF = config.Config()
class SigninHandler(base.BaseHandler):
diff --git a/testapi/opnfv_testapi/ui/root.py b/testapi/opnfv_testapi/ui/root.py
index bba7a86..5b2c922 100644
--- a/testapi/opnfv_testapi/ui/root.py
+++ b/testapi/opnfv_testapi/ui/root.py
@@ -1,10 +1,10 @@
from opnfv_testapi.resources.handlers import GenericApiHandler
-from opnfv_testapi.common import config
+from opnfv_testapi.common.config import CONF
class RootHandler(GenericApiHandler):
def get_template_path(self):
- return config.Config().static_path
+ return CONF.static_path
def get(self):
self.render('testapi-ui/index.html')