summaryrefslogtreecommitdiffstats
path: root/opnfv_testapi
diff options
context:
space:
mode:
authorStamatis Katsaounis <mokats@intracom-telecom.com>2018-11-28 10:43:33 +0200
committerStamatis Katsaounis <mokats@intracom-telecom.com>2018-11-28 10:58:54 +0200
commit83c44e0acaed30f2388a69fd13ec806c38edfd73 (patch)
tree12408f8aa5814ea57e6381f2e99931b799f22a25 /opnfv_testapi
parent2735ea8a2aef55ebb0a48b50d9a0e36cf3f63b94 (diff)
Improve Docker deployment
JIRA: DOVETAIL-755 This patch improves Docker deployment. It removes the extra unwanted container. In addition, it removes unused files. Finally, it fixes the issue of python install where the static files of swagger where not installed inside the api container. Change-Id: Id74c88ab77182ed233f0eedad39ff8da245bb3dd Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
Diffstat (limited to 'opnfv_testapi')
-rw-r--r--opnfv_testapi/cmd/server.py2
-rw-r--r--opnfv_testapi/common/config.py4
-rw-r--r--opnfv_testapi/tests/unit/common/normal.ini3
-rw-r--r--opnfv_testapi/ui/root.py2
4 files changed, 5 insertions, 6 deletions
diff --git a/opnfv_testapi/cmd/server.py b/opnfv_testapi/cmd/server.py
index d503c8a..fee5877 100644
--- a/opnfv_testapi/cmd/server.py
+++ b/opnfv_testapi/cmd/server.py
@@ -45,7 +45,7 @@ my_logger.addHandler(handler)
def make_app():
swagger.docs(base_url=CONF.swagger_base_url,
- static_path=CONF.static_path)
+ static_path=CONF.ui_static_path)
return swagger.Application(
url_mappings.mappings,
debug=CONF.api_debug,
diff --git a/opnfv_testapi/common/config.py b/opnfv_testapi/common/config.py
index a6ab338..75bacf3 100644
--- a/opnfv_testapi/common/config.py
+++ b/opnfv_testapi/common/config.py
@@ -20,10 +20,6 @@ class Config(object):
self._set_config_file()
self._parse()
self._parse_per_page()
- self.static_path = os.path.join(
- os.path.dirname(os.path.normpath(__file__)),
- os.pardir,
- 'static')
self.base_path = "/home/testapi"
def _parse(self):
diff --git a/opnfv_testapi/tests/unit/common/normal.ini b/opnfv_testapi/tests/unit/common/normal.ini
index 6906913..678cb68 100644
--- a/opnfv_testapi/tests/unit/common/normal.ini
+++ b/opnfv_testapi/tests/unit/common/normal.ini
@@ -16,3 +16,6 @@ log_file = /dev/null
[swagger]
base_url = http://localhost:8000
+
+[ui]
+static_path = /usr/local/share/opnfv_testapi
diff --git a/opnfv_testapi/ui/root.py b/opnfv_testapi/ui/root.py
index 5b2c922..7f970b2 100644
--- a/opnfv_testapi/ui/root.py
+++ b/opnfv_testapi/ui/root.py
@@ -4,7 +4,7 @@ from opnfv_testapi.common.config import CONF
class RootHandler(GenericApiHandler):
def get_template_path(self):
- return CONF.static_path
+ return CONF.ui_static_path
def get(self):
self.render('testapi-ui/index.html')