summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vio/docker/Dockerfile6
-rwxr-xr-xvio/run.sh19
-rw-r--r--vio/vio/pub/config/config.py4
-rw-r--r--vio/vio/pub/vim/vimapi/heat/OperateStack.py2
4 files changed, 16 insertions, 15 deletions
diff --git a/vio/docker/Dockerfile b/vio/docker/Dockerfile
index 6cd1361..02a6f9d 100644
--- a/vio/docker/Dockerfile
+++ b/vio/docker/Dockerfile
@@ -24,11 +24,11 @@ RUN cd /opt/ && \
wget -q -O multicloud-vio.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.multicloud.openstack.vmware&a=multicloud-openstack-vmware&v=1.3.0-SNAPSHOT&e=zip' && \
unzip multicloud-vio.zip && \
rm -rf multicloud-vio.zip && \
- pip install -r vio/requirements.txt && \
- chown onap:onap -R vio/
+ pip install -r /opt/vio/requirements.txt && \
+ chown onap:onap -R /opt/vio/
USER onap
-WORKDIR /opt
+WORKDIR /opt/vio
# ENTRYPOINT vio/docker/docker-entrypoint.sh
CMD ["/bin/sh", "-c", "/opt/vio/run.sh"]
diff --git a/vio/run.sh b/vio/run.sh
index 404f1d6..8585bc2 100755
--- a/vio/run.sh
+++ b/vio/run.sh
@@ -13,18 +13,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-sed -i "s/MSB_SERVICE_IP =.*/MSB_SERVICE_IP = \"${MSB_ADDR}\"/g" vio/pub/config/config.py
-sed -i "s/MSB_SERVICE_PORT =.*/MSB_SERVICE_PORT = \"${MSB_PORT}\"/g" vio/pub/config/config.py
-sed -i "s/AAI_ADDR =.*/AAI_ADDR = \"${AAI_ADDR}\"/g" vio/pub/config/config.py
-sed -i "s/AAI_PORT =.*/AAI_PORT = \"${AAI_PORT}\"/g" vio/pub/config/config.py
-sed -i "s/AAI_SCHEMA_VERSION =.*/AAI_SCHEMA_VERSION = \"${AAI_SCHEMA_VERSION}\"/g" vio/pub/config/config.py
-sed -i "s/AAI_USERNAME =.*/AAI_USERNAME = \"${AAI_USERNAME}\"/g" vio/pub/config/config.py
-sed -i "s/AAI_PASSWORD =.*/AAI_PASSWORD = \"${AAI_PASSWORD}\"/g" vio/pub/config/config.py
-sed -i "s/MR_ADDR =.*/MR_ADDR = \"${MR_ADDR}\"/g" vio/pub/config/config.py
-sed -i "s/MR_PORT =.*/MR_PORT = \"${MR_PORT}\"/g" vio/pub/config/config.py
+sed -i "s/MSB_SERVICE_IP =.*/MSB_SERVICE_IP = \"${MSB_ADDR}\"/g" /opt/vio/vio/pub/config/config.py
+sed -i "s/MSB_SERVICE_PORT =.*/MSB_SERVICE_PORT = \"${MSB_PORT}\"/g" /opt/vio/vio/pub/config/config.py
+sed -i "s/AAI_ADDR =.*/AAI_ADDR = \"${AAI_ADDR}\"/g" /opt/vio/vio/pub/config/config.py
+sed -i "s/AAI_PORT =.*/AAI_PORT = \"${AAI_PORT}\"/g" /opt/vio/vio/pub/config/config.py
+sed -i "s/AAI_SCHEMA_VERSION =.*/AAI_SCHEMA_VERSION = \"${AAI_SCHEMA_VERSION}\"/g" /opt/vio/vio/pub/config/config.py
+sed -i "s/AAI_USERNAME =.*/AAI_USERNAME = \"${AAI_USERNAME}\"/g" /opt/vio/vio/pub/config/config.py
+sed -i "s/AAI_PASSWORD =.*/AAI_PASSWORD = \"${AAI_PASSWORD}\"/g" /opt/vio/vio/pub/config/config.py
+sed -i "s/MR_ADDR =.*/MR_ADDR = \"${MR_ADDR}\"/g" /opt/vio/vio/pub/config/config.py
+sed -i "s/MR_PORT =.*/MR_PORT = \"${MR_PORT}\"/g" /opt/vio/vio/pub/config/config.py
logDir="/var/log/onap/multicloud/vio"
+mkdir -p $logDir
if [ "$WEB_FRAMEWORK" == "pecan" ]
then
diff --git a/vio/vio/pub/config/config.py b/vio/vio/pub/config/config.py
index b6b8caa..c461b24 100644
--- a/vio/vio/pub/config/config.py
+++ b/vio/vio/pub/config/config.py
@@ -21,8 +21,8 @@ ROOT_PATH = os.path.dirname(os.path.dirname(
os.path.dirname(os.path.abspath(__file__))))
# [A&AI]
-AAI_ADDR = "aai.api.simpledemo.openecomp.org"
-AAI_PORT = "8443"
+AAI_ADDR = os.getenv("AAI_ADDR", "aai.api.simpledemo.openecomp.org")
+AAI_PORT = os.getenv("AAI_PORT", "8443")
AAI_SERVICE_URL = 'https://%s:%s/aai' % (AAI_ADDR, AAI_PORT)
AAI_SCHEMA_VERSION = "v13"
AAI_USERNAME = 'AAI'
diff --git a/vio/vio/pub/vim/vimapi/heat/OperateStack.py b/vio/vio/pub/vim/vimapi/heat/OperateStack.py
index 49efd30..60b39fa 100644
--- a/vio/vio/pub/vim/vimapi/heat/OperateStack.py
+++ b/vio/vio/pub/vim/vimapi/heat/OperateStack.py
@@ -40,7 +40,7 @@ class OperateStack(baseclient):
def get_vim_stacks(self, **query):
stacks = self.heat(self.param).stack_list(**query)
- return stacks
+ return [st for st in stacks]
def create_vim_stack(self, **body):
stack = self.heat(self.param).stack_create(**body)