diff options
author | Yun Huang <yun.huang@windriver.com> | 2018-03-07 15:14:13 +0800 |
---|---|---|
committer | Yun Huang <yun.huang@windriver.com> | 2018-03-07 15:14:13 +0800 |
commit | cb77efe24202d7058dc11fa69411917881f058ac (patch) | |
tree | a6b89875783bc3890870eeb3b93a9be172a7321e | |
parent | 2865eefc7233dbf3c5d8648d9871c79d3ed01795 (diff) |
Populate settings with env vars
Change-Id: Iaaf9a638b2dbb39d12e186c975189d7d6a8cd83f
Issue-ID: MULTICLOUD-138
Signed-off-by: Yun Huang <yun.huang@windriver.com>
-rw-r--r-- | windriver/titanium_cloud/settings.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/windriver/titanium_cloud/settings.py b/windriver/titanium_cloud/settings.py index 446a68d0..c8e39518 100644 --- a/windriver/titanium_cloud/settings.py +++ b/windriver/titanium_cloud/settings.py @@ -120,19 +120,20 @@ CACHES = { } # [MSB] -MSB_SERVICE_ADDR = '127.0.0.1' -MSB_SERVICE_PORT = '80' +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-titanium_cloud/v0" %(MSB_SERVICE_ADDR, MSB_SERVICE_PORT) +MULTICLOUD_PREFIX = "http://%s:%s/api/multicloud-titanium_cloud/v0" % ( + MSB_SERVICE_ADDR, MSB_SERVICE_PORT) # [A&AI] -AAI_ADDR = "aai.api.simpledemo.openecomp.org" -AAI_PORT = "8443" +AAI_ADDR = os.environ.get('AAI_ADDR', "aai.api.simpledemo.openecomp.org") +AAI_PORT = os.environ.get('AAI_PORT', "8443") AAI_SERVICE_URL = 'https://%s:%s/aai' % (AAI_ADDR, AAI_PORT) -AAI_SCHEMA_VERSION = "v11" -AAI_USERNAME = 'AAI' -AAI_PASSWORD = 'AAI' +AAI_SCHEMA_VERSION = os.environ.get('AAI_SCHEMA_VERSION', "v11") +AAI_USERNAME = os.environ.get('AAI_USERNAME', "AAI") +AAI_PASSWORD = os.environ.get('AAI_PASSWORD', "AAI") AAI_BASE_URL = "%s/%s" % (AAI_SERVICE_URL, AAI_SCHEMA_VERSION) |