diff options
author | Victor Morales <victor.morales@intel.com> | 2018-05-08 17:18:21 -0700 |
---|---|---|
committer | Victor Morales <victor.morales@intel.com> | 2018-05-08 17:18:21 -0700 |
commit | 408bbd742c250bf66611c577eb3af4496b70d525 (patch) | |
tree | acd8dc9c60cebc3e7c52e77ae31c6359a76b5b54 /ocata | |
parent | 3c13299e1f76c30dccb5509f0d2b30486f29a3ff (diff) |
Add AAI_SERVICE_URL environment variable
The settings.py file uses the values of AAI_ADDR and AAI_PORT to
create AAI_SERVICE_URL config value. This last value uses a template
which contains the https protocol. Using secure protocols are good
practice for production deployments but can be a restriction during
testing. This change allows to modify this value.
Change-Id: Idc7b0b709caf79e03c2f66774ef780223b913946
Signed-off-by: Victor Morales <victor.morales@intel.com>
Issue-ID: MULTICLOUD-214
Diffstat (limited to 'ocata')
-rw-r--r-- | ocata/docker/Dockerfile | 3 | ||||
-rw-r--r-- | ocata/ocata/settings.py | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/ocata/docker/Dockerfile b/ocata/docker/Dockerfile index 1b8477f3..8688328f 100644 --- a/ocata/docker/Dockerfile +++ b/ocata/docker/Dockerfile @@ -10,6 +10,7 @@ ENV MSB_ADDR "127.0.0.1" ENV MSB_PORT "80" ENV AAI_ADDR "aai.api.simpledemo.openecomp.org" ENV AAI_PORT "8443" +ENV AAI_SERVICE_URL ENV AAI_SCHEMA_VERSION "v13" ENV AAI_USERNAME "AAI" ENV AAI_PASSWORD "AAI" @@ -28,4 +29,4 @@ RUN apt-get update && \ pip install -r /opt/ocata/requirements.txt WORKDIR /opt/ocata -CMD /bin/sh -c /opt/ocata/run.sh
\ No newline at end of file +CMD /bin/sh -c /opt/ocata/run.sh diff --git a/ocata/ocata/settings.py b/ocata/ocata/settings.py index 9a205ab5..79344374 100644 --- a/ocata/ocata/settings.py +++ b/ocata/ocata/settings.py @@ -100,7 +100,7 @@ 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 = 'https://%s:%s/aai' % (AAI_ADDR, AAI_PORT) +AAI_SERVICE_URL = os.environ.get('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") |