summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBin Sun <bins@vmware.com>2018-03-26 14:39:10 +0800
committerBin Sun <bins@vmware.com>2018-03-26 14:46:38 +0800
commit382204d0cc69fcd33f734ff3e172dcb5d5515b6b (patch)
treeb240985f0ac6e978060714ac53e4395464823715
parent73742ff84db9f2e72701c16e544dd76d57132328 (diff)
Add port of api server as configuration
Change-Id: Iab43076d7045c64ca11272455562ac37d49491c3 Issue-ID: MULTICLOUD-150 Signed-off-by: Bin Sun <bins@vmware.com>
-rw-r--r--multivimbroker/multivimbroker/api_v2/service.py4
-rw-r--r--multivimbroker/multivimbroker/pub/config/config.py3
2 files changed, 5 insertions, 2 deletions
diff --git a/multivimbroker/multivimbroker/api_v2/service.py b/multivimbroker/multivimbroker/api_v2/service.py
index 228cc63..d080068 100644
--- a/multivimbroker/multivimbroker/api_v2/service.py
+++ b/multivimbroker/multivimbroker/api_v2/service.py
@@ -16,6 +16,7 @@ from oslo_service import service
from oslo_service import wsgi
from multivimbroker.api_v2 import app
+from multivimbroker.pub.config import config as mc_cfg
CONF = cfg.CONF
@@ -33,9 +34,8 @@ class WSGIService(service.ServiceBase):
CONF,
"multivimbroker",
self.app,
- # TODO(xiaohhui): these should be configurable.
host="0.0.0.0",
- port="9002",
+ port=mc_cfg.API_SERVER_PORT,
use_ssl=False
)
diff --git a/multivimbroker/multivimbroker/pub/config/config.py b/multivimbroker/multivimbroker/pub/config/config.py
index 192c743..727b0cc 100644
--- a/multivimbroker/multivimbroker/pub/config/config.py
+++ b/multivimbroker/multivimbroker/pub/config/config.py
@@ -36,3 +36,6 @@ FORWARDED_FOR_FIELDS = ["HTTP_X_FORWARDED_FOR", "HTTP_X_FORWARDED_HOST",
# [IMAGE LOCAL PATH]
ROOT_PATH = os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+
+# [Local Config]
+API_SERVER_PORT = 9001