summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBin Yang <bin.yang@windriver.com>2020-02-03 18:49:15 +0800
committerBin Yang <bin.yang@windriver.com>2020-02-03 18:49:15 +0800
commit74278035bbbb535274f74bb00c4e71eb4daf2fe2 (patch)
tree25e08619e3191a084587a72676762b5dbff58baa
parent5f8e9379af90e81ad4a4d27b8cf6afb6edb40569 (diff)
Enable the usage of msb https endpoint
Change-Id: I96ef526f1aa99415f45bc8dfdd8d737f8bd5eed5 Issue-ID: MULTICLOUD-978 Signed-off-by: Bin Yang <bin.yang@windriver.com>
-rw-r--r--fcaps/docker/Dockerfile1
-rw-r--r--fcaps/fcaps/settings.py10
-rw-r--r--ocata/docker/Dockerfile1
-rw-r--r--ocata/ocata/settings.py10
-rw-r--r--pike/docker/Dockerfile1
-rw-r--r--pike/pike/settings.py10
-rw-r--r--share/common/utils/restcall.py3
-rw-r--r--starlingx/docker/Dockerfile1
-rw-r--r--starlingx/starlingx/settings.py10
-rw-r--r--windriver/docker/Dockerfile1
-rw-r--r--windriver/titanium_cloud/settings.py11
11 files changed, 37 insertions, 22 deletions
diff --git a/fcaps/docker/Dockerfile b/fcaps/docker/Dockerfile
index 3369e5e6..06654e95 100644
--- a/fcaps/docker/Dockerfile
+++ b/fcaps/docker/Dockerfile
@@ -6,6 +6,7 @@ ARG HTTPS_PROXY=${HTTPS_PROXY}
ENV http_proxy $HTTP_PROXY
ENV https_proxy $HTTPS_PROXY
+ENV MSB_PROTO "http"
ENV MSB_ADDR "127.0.0.1"
ENV MSB_PORT "80"
ENV AAI_ADDR "aai.api.simpledemo.openecomp.org"
diff --git a/fcaps/fcaps/settings.py b/fcaps/fcaps/settings.py
index 7844c68f..979c1519 100644
--- a/fcaps/fcaps/settings.py
+++ b/fcaps/fcaps/settings.py
@@ -93,15 +93,17 @@ CACHES = {
}
# [MSB]
+DEFAULT_MSB_PROTO = "http"
+MSB_SERVICE_PROTOCOL = os.environ.get('MSB_PROTO', DEFAULT_MSB_PROTO)
MSB_SERVICE_ADDR = os.environ.get('MSB_ADDR', DEFAULT_MSB_ADDR)
MSB_SERVICE_PORT = os.environ.get('MSB_PORT', "80")
# [Multicloud]
-MULTICLOUD_PREFIX = "http://%s:%s/api/multicloud/v0" % (
- MSB_SERVICE_ADDR, MSB_SERVICE_PORT)
+MULTICLOUD_PREFIX = "%s://%s:%s/api/multicloud/v0" % (
+ MSB_SERVICE_PROTOCOL, MSB_SERVICE_ADDR, MSB_SERVICE_PORT)
-MULTICLOUD_API_V1_PREFIX = "http://%s:%s/api/multicloud/v1" % (
- MSB_SERVICE_ADDR, MSB_SERVICE_PORT)
+MULTICLOUD_API_V1_PREFIX = "%s://%s:%s/api/multicloud/v1" % (
+ MSB_SERVICE_PROTOCOL, MSB_SERVICE_ADDR, MSB_SERVICE_PORT)
# [A&AI]
AAI_ADDR = os.environ.get('AAI_ADDR', "aai.api.simpledemo.openecomp.org")
diff --git a/ocata/docker/Dockerfile b/ocata/docker/Dockerfile
index dffd40bc..c4fa139a 100644
--- a/ocata/docker/Dockerfile
+++ b/ocata/docker/Dockerfile
@@ -20,6 +20,7 @@ ARG HTTPS_PROXY=${HTTPS_PROXY}
ENV http_proxy $HTTP_PROXY
ENV https_proxy $HTTPS_PROXY
+ENV MSB_PROTO "http"
ENV MSB_ADDR "127.0.0.1"
ENV MSB_PORT "80"
ENV AAI_ADDR "aai.api.simpledemo.openecomp.org"
diff --git a/ocata/ocata/settings.py b/ocata/ocata/settings.py
index dd59f6bb..9ab7989e 100644
--- a/ocata/ocata/settings.py
+++ b/ocata/ocata/settings.py
@@ -90,15 +90,17 @@ CACHES = {
}
# [MSB]
+DEFAULT_MSB_PROTO = "http"
+MSB_SERVICE_PROTOCOL = os.environ.get('MSB_PROTO', DEFAULT_MSB_PROTO)
MSB_SERVICE_ADDR = os.environ.get('MSB_ADDR', "127.0.0.1")
MSB_SERVICE_PORT = os.environ.get('MSB_PORT', "80")
# [Multicloud]
-MULTICLOUD_PREFIX = "http://%s:%s/api/multicloud-ocata/v0" % (
- MSB_SERVICE_ADDR, MSB_SERVICE_PORT)
+MULTICLOUD_PREFIX = "%s://%s:%s/api/multicloud-ocata/v0" % (
+ MSB_SERVICE_PROTOCOL, MSB_SERVICE_ADDR, MSB_SERVICE_PORT)
-MULTICLOUD_API_V1_PREFIX = "http://%s:%s/api/multicloud-ocata/v1" % (
- MSB_SERVICE_ADDR, MSB_SERVICE_PORT)
+MULTICLOUD_API_V1_PREFIX = "%s://%s:%s/api/multicloud-ocata/v1" % (
+ MSB_SERVICE_PROTOCOL, MSB_SERVICE_ADDR, MSB_SERVICE_PORT)
# [A&AI]
AAI_ADDR = os.environ.get('AAI_ADDR', "aai.api.simpledemo.openecomp.org")
diff --git a/pike/docker/Dockerfile b/pike/docker/Dockerfile
index bad59678..af7ded77 100644
--- a/pike/docker/Dockerfile
+++ b/pike/docker/Dockerfile
@@ -20,6 +20,7 @@ ARG HTTPS_PROXY=${HTTPS_PROXY}
ENV http_proxy $HTTP_PROXY
ENV https_proxy $HTTPS_PROXY
+ENV MSB_PROTO "http"
ENV MSB_ADDR "127.0.0.1"
ENV MSB_PORT "80"
ENV AAI_ADDR "aai.api.simpledemo.openecomp.org"
diff --git a/pike/pike/settings.py b/pike/pike/settings.py
index 406a58da..d946383b 100644
--- a/pike/pike/settings.py
+++ b/pike/pike/settings.py
@@ -90,15 +90,17 @@ CACHES = {
}
# [MSB]
+DEFAULT_MSB_PROTO = "http"
+MSB_SERVICE_PROTOCOL = os.environ.get('MSB_PROTO', DEFAULT_MSB_PROTO)
MSB_SERVICE_ADDR = os.environ.get('MSB_ADDR', "127.0.0.1")
MSB_SERVICE_PORT = os.environ.get('MSB_PORT', "80")
# [Multicloud]
-MULTICLOUD_PREFIX = "http://%s:%s/api/multicloud-pike/v0" % (
- MSB_SERVICE_ADDR, MSB_SERVICE_PORT)
+MULTICLOUD_PREFIX = "%s://%s:%s/api/multicloud-pike/v0" % (
+ MSB_SERVICE_PROTOCOL, MSB_SERVICE_ADDR, MSB_SERVICE_PORT)
-MULTICLOUD_API_V1_PREFIX = "http://%s:%s/api/multicloud-pike/v1" % (
- MSB_SERVICE_ADDR, MSB_SERVICE_PORT)
+MULTICLOUD_API_V1_PREFIX = "%s://%s:%s/api/multicloud-pike/v1" % (
+ MSB_SERVICE_PROTOCOL, MSB_SERVICE_ADDR, MSB_SERVICE_PORT)
# [A&AI]
AAI_ADDR = os.environ.get('AAI_ADDR', "aai.api.simpledemo.openecomp.org")
diff --git a/share/common/utils/restcall.py b/share/common/utils/restcall.py
index 9e204564..1c2e478b 100644
--- a/share/common/utils/restcall.py
+++ b/share/common/utils/restcall.py
@@ -117,7 +117,8 @@ def _call_req(base_url, user, passwd, auth_type,
def req_by_msb(resource, method, content=''):
- base_url = "http://%s:%s/" % (settings.MSB_SERVICE_ADDR, settings.MSB_SERVICE_PORT)
+ base_url = "%s://%s:%s/" % (
+ settings.MSB_SERVICE_PROTOCOL, settings.MSB_SERVICE_ADDR, settings.MSB_SERVICE_PORT)
return _call_req(base_url, "", "", rest_no_auth,
resource, method, "", content)
diff --git a/starlingx/docker/Dockerfile b/starlingx/docker/Dockerfile
index 9020057d..4e635297 100644
--- a/starlingx/docker/Dockerfile
+++ b/starlingx/docker/Dockerfile
@@ -20,6 +20,7 @@ ARG HTTPS_PROXY=${HTTPS_PROXY}
ENV http_proxy $HTTP_PROXY
ENV https_proxy $HTTPS_PROXY
+ENV MSB_PROTO "http"
ENV MSB_ADDR "127.0.0.1"
ENV MSB_PORT "80"
ENV AAI_ADDR "aai.api.simpledemo.openecomp.org"
diff --git a/starlingx/starlingx/settings.py b/starlingx/starlingx/settings.py
index e6750c7b..56547ce2 100644
--- a/starlingx/starlingx/settings.py
+++ b/starlingx/starlingx/settings.py
@@ -90,15 +90,17 @@ CACHES = {
}
# [MSB]
+DEFAULT_MSB_PROTO = "http"
+MSB_SERVICE_PROTOCOL = os.environ.get('MSB_PROTO', DEFAULT_MSB_PROTO)
MSB_SERVICE_ADDR = os.environ.get('MSB_ADDR', "127.0.0.1")
MSB_SERVICE_PORT = os.environ.get('MSB_PORT', "80")
# [Multicloud]
-MULTICLOUD_PREFIX = "http://%s:%s/api/multicloud-starlingx/v0" % (
- MSB_SERVICE_ADDR, MSB_SERVICE_PORT)
+MULTICLOUD_PREFIX = "%s://%s:%s/api/multicloud-starlingx/v0" % (
+ MSB_SERVICE_PROTOCOL, MSB_SERVICE_ADDR, MSB_SERVICE_PORT)
-MULTICLOUD_API_V1_PREFIX = "http://%s:%s/api/multicloud-starlingx/v1" % (
- MSB_SERVICE_ADDR, MSB_SERVICE_PORT)
+MULTICLOUD_API_V1_PREFIX = "%s://%s:%s/api/multicloud-starlingx/v1" % (
+ MSB_SERVICE_PROTOCOL, MSB_SERVICE_ADDR, MSB_SERVICE_PORT)
# [A&AI]
AAI_ADDR = os.environ.get('AAI_ADDR', "aai.api.simpledemo.openecomp.org")
diff --git a/windriver/docker/Dockerfile b/windriver/docker/Dockerfile
index 909e13d3..4bde9d50 100644
--- a/windriver/docker/Dockerfile
+++ b/windriver/docker/Dockerfile
@@ -6,6 +6,7 @@ ARG HTTPS_PROXY=${HTTPS_PROXY}
ENV http_proxy $HTTP_PROXY
ENV https_proxy $HTTPS_PROXY
+ENV MSB_PROTO "http"
ENV MSB_ADDR "127.0.0.1"
ENV MSB_PORT "80"
ENV AAI_ADDR "aai.api.simpledemo.openecomp.org"
diff --git a/windriver/titanium_cloud/settings.py b/windriver/titanium_cloud/settings.py
index 4d51c11a..a4d7f631 100644
--- a/windriver/titanium_cloud/settings.py
+++ b/windriver/titanium_cloud/settings.py
@@ -81,7 +81,7 @@ TIME_ZONE = 'UTC'
STATIC_URL = '/static/'
-
+DEFAULT_MSB_PROTO = "http"
DEFAULT_MSB_ADDR = "127.0.0.1"
DEFAULT_CACHE_BACKEND_LOCATION = '127.0.0.1:11211'
@@ -93,15 +93,16 @@ CACHES = {
}
# [MSB]
+MSB_SERVICE_PROTOCOL = os.environ.get('MSB_PROTO', DEFAULT_MSB_PROTO)
MSB_SERVICE_ADDR = os.environ.get('MSB_ADDR', DEFAULT_MSB_ADDR)
MSB_SERVICE_PORT = os.environ.get('MSB_PORT', "80")
# [Multicloud]
-MULTICLOUD_PREFIX = "http://%s:%s/api/multicloud-titaniumcloud/v0" % (
- MSB_SERVICE_ADDR, MSB_SERVICE_PORT)
+MULTICLOUD_PREFIX = "%s://%s:%s/api/multicloud-titaniumcloud/v0" % (
+ MSB_SERVICE_PROTOCOL, MSB_SERVICE_ADDR, MSB_SERVICE_PORT)
-MULTICLOUD_API_V1_PREFIX = "http://%s:%s/api/multicloud-titaniumcloud/v1" % (
- MSB_SERVICE_ADDR, MSB_SERVICE_PORT)
+MULTICLOUD_API_V1_PREFIX = "%s://%s:%s/api/multicloud-titaniumcloud/v1" % (
+ MSB_SERVICE_PROTOCOL, MSB_SERVICE_ADDR, MSB_SERVICE_PORT)
# [A&AI]
AAI_ADDR = os.environ.get('AAI_ADDR', "aai.api.simpledemo.openecomp.org")