Provide default value for AAI_SERVICE_URL 55/51155/2
authorYun Huang <yun.huang@windriver.com>
Tue, 12 Jun 2018 09:15:08 +0000 (17:15 +0800)
committerYun Huang <yun.huang@windriver.com>
Tue, 12 Jun 2018 09:23:58 +0000 (17:23 +0800)
In the MultiCloud HPA CSIT, the setup.sh script requires to control
the value of AAI_SERVICE_URL in order to avoid the use of certificates.
when AAI_SERVICE_URL not be set by CSIT, the system need to provide
a default value.

Change-Id: I70dd7074162f75d2d26aa6580da454ea369910ce
Issue-ID: MULTICLOUD-244
Signed-off-by: Yun Huang <yun.huang@windriver.com>
ocata/ocata/settings.py

index 7934437..f9f040b 100644 (file)
@@ -100,7 +100,11 @@ MULTICLOUD_PREFIX = "http://%s:%s/api/multicloud-ocata/v0" % (
 # [A&AI]
 AAI_ADDR = os.environ.get('AAI_ADDR', "aai.api.simpledemo.openecomp.org")
 AAI_PORT = os.environ.get('AAI_PORT', "8443")
-AAI_SERVICE_URL = os.environ.get('AAI_SERVICE_URL', 'https://%s:%s/aai' % (AAI_ADDR, AAI_PORT))
+
+AAI_SERVICE_URL = os.environ.get('AAI_SERVICE_URL', "")
+if AAI_SERVICE_URL == "":
+    AAI_SERVICE_URL = 'https://%s:%s/aai' % (AAI_ADDR, AAI_PORT)
+
 AAI_SCHEMA_VERSION = os.environ.get('AAI_SCHEMA_VERSION', "v13")
 AAI_USERNAME = os.environ.get('AAI_USERNAME', "AAI")
 AAI_PASSWORD = os.environ.get('AAI_PASSWORD', "AAI")