From 74278035bbbb535274f74bb00c4e71eb4daf2fe2 Mon Sep 17 00:00:00 2001 From: Bin Yang Date: Mon, 3 Feb 2020 18:49:15 +0800 Subject: Enable the usage of msb https endpoint Change-Id: I96ef526f1aa99415f45bc8dfdd8d737f8bd5eed5 Issue-ID: MULTICLOUD-978 Signed-off-by: Bin Yang --- windriver/titanium_cloud/settings.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'windriver/titanium_cloud') 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") -- cgit 1.2.3-korg