From: yangyan Date: Fri, 28 Feb 2020 11:50:19 +0000 (+0800) Subject: Change the MSB registration switch to the environment variable acquisition mode and... X-Git-Tag: 1.3.7~2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=115df251a528b94db589016c07d7722fea484af1;p=vfc%2Fgvnfm%2Fvnfres.git Change the MSB registration switch to the environment variable acquisition mode and fix typo error Change-Id: Ifa0f27a999c7000f61c65d0a036979b5398090cc Issue-ID: VFC-1601 Signed-off-by: yangyan --- diff --git a/res/docker/docker-entrypoint.sh b/res/docker/docker-entrypoint.sh index ec53bd9..60abc80 100755 --- a/res/docker/docker-entrypoint.sh +++ b/res/docker/docker-entrypoint.sh @@ -20,8 +20,8 @@ echo "MYSQL_ADDR=$MYSQL_ADDR" # Wait for MSB initialization echo "Wait for MSB initialization" for i in {1..5}; do - curl -sS -m 1 $MSB_PROTO:$MSB_ADDR/msb -k > /dev/null - res=$i? + curl -sS -m 1 $MSB_PROTO://$MSB_ADDR/msb -k > /dev/null + res=$? if [ $res -ne 0 ]; then break fi diff --git a/res/docker/instance_config.sh b/res/docker/instance_config.sh index 6ed2988..c770a2b 100755 --- a/res/docker/instance_config.sh +++ b/res/docker/instance_config.sh @@ -3,6 +3,10 @@ MSB_PROTO=`echo $MSB_PROTO` MSB_IP=`echo $MSB_ADDR | cut -d: -f 1` MSB_PORT=`echo $MSB_ADDR | cut -d: -f 2` +if [ $REG_TO_MSB_WHEN_START ]; then + + sed -i "s|REG_TO_MSB_WHEN_START = .*|REG_TO_MSB_WHEN_START = '$REG_TO_MSB_WHEN_START'|" vfc/gvnfm/vnfres/res/res/pub/config/config.py +fi if [ $MSB_PROTO ]; then sed -i "s|MSB_SERVICE_PROTOCOL = .*|MSB_SERVICE_PROTOCOL = '$MSB_PROTO'|" vfc/gvnfm/vnfres/res/res/pub/config/config.py