diff options
author | Bin Sun <bins@vmware.com> | 2018-03-26 15:09:07 +0800 |
---|---|---|
committer | Bin Sun <bins@vmware.com> | 2018-03-26 17:13:33 +0800 |
commit | 1c3269cad09e3ff8ac54f47601beb34c6d502149 (patch) | |
tree | 6b7a6ce5f6f58098cd752ca2a5be68a45e211722 | |
parent | 1cdaa0928663eb3359a849776bf5fcd8700c7ae1 (diff) |
Add port of api server as configuration
Change-Id: Ia1faa01ef6a84a8c2f050541d8786d610d81bcd6
Issue-ID: MULTICLOUD-150
Signed-off-by: Bin Sun <bins@vmware.com>
-rw-r--r-- | vio/vio/api_v2/service.py | 4 | ||||
-rw-r--r-- | vio/vio/pub/config/config.py | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/vio/vio/api_v2/service.py b/vio/vio/api_v2/service.py index a9473c3..60fb991 100644 --- a/vio/vio/api_v2/service.py +++ b/vio/vio/api_v2/service.py @@ -16,6 +16,7 @@ from oslo_service import service from oslo_service import wsgi from vio.api_v2 import app +from vio.pub.config import config as mc_cfg CONF = cfg.CONF @@ -33,9 +34,8 @@ class WSGIService(service.ServiceBase): CONF, "vio", self.app, - # TODO(xiaohhui): these should be configurable. host="0.0.0.0", - port="9004", + port=mc_cfg.API_SERVER_PORT, use_ssl=False ) diff --git a/vio/vio/pub/config/config.py b/vio/vio/pub/config/config.py index 9b4d6c8..ad5bb48 100644 --- a/vio/vio/pub/config/config.py +++ b/vio/vio/pub/config/config.py @@ -32,3 +32,6 @@ AAI_PASSWORD = 'AAI' SERVICE_NAME = "multicloud-vio" FORWARDED_FOR_FIELDS = ["HTTP_X_FORWARDED_FOR", "HTTP_X_FORWARDED_HOST", "HTTP_X_FORWARDED_SERVER"] + +# [Local Config] +API_SERVER_PORT = 9004 |