Add port of api server as configuration 03/38403/1
authorBin Sun <bins@vmware.com>
Mon, 26 Mar 2018 06:39:10 +0000 (14:39 +0800)
committerBin Sun <bins@vmware.com>
Mon, 26 Mar 2018 06:46:38 +0000 (14:46 +0800)
Change-Id: Iab43076d7045c64ca11272455562ac37d49491c3
Issue-ID: MULTICLOUD-150
Signed-off-by: Bin Sun <bins@vmware.com>
multivimbroker/multivimbroker/api_v2/service.py
multivimbroker/multivimbroker/pub/config/config.py

index 228cc63..d080068 100644 (file)
@@ -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
         )
 
index 192c743..727b0cc 100644 (file)
@@ -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