diff options
author | Ethan Lynn <ethanlynnl@vmware.com> | 2019-02-26 16:57:19 +0800 |
---|---|---|
committer | Ethan Lynn <ethanlynnl@vmware.com> | 2019-02-26 17:03:49 +0800 |
commit | 112dd7070ba925e4cc80191aac86e33696aea5ef (patch) | |
tree | 6555e00caf43f7eb13b9361dc152f54092424717 /vio | |
parent | 70792c40cb8dd39ffbfbeebe324dd911a3c7f0d6 (diff) |
Fix docker permission
fix docker permission
Change-Id: I5efe76ab8d57a1eb5e318db1befdc09c965299e5
Issue-ID: MULTICLOUD-497
Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
Diffstat (limited to 'vio')
-rw-r--r-- | vio/docker/Dockerfile | 6 | ||||
-rwxr-xr-x | vio/run.sh | 19 | ||||
-rw-r--r-- | vio/vio/pub/config/config.py | 4 | ||||
-rw-r--r-- | vio/vio/pub/vim/vimapi/heat/OperateStack.py | 2 |
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"] @@ -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) |