diff options
author | yangyan <yangyanyj@chinamobile.com> | 2020-02-28 19:57:35 +0800 |
---|---|---|
committer | Yan Yang <yangyanyj@chinamobile.com> | 2020-02-28 11:58:37 +0000 |
commit | 5ba475b6bdbc322599800272adbe0995670f3efc (patch) | |
tree | dd0d76c4c06ee35c7f3feadb3a89486bbc9306c4 | |
parent | 20724692f07eb00b51cc215b79f069800a450bb2 (diff) |
Change the MSB registration switch to the environment variable acquisition mode and fix typo error
Change-Id: Ica6f3b07beaaefdd9d2f1988b325fb0c46e537ee
Issue-ID: VFC-1601
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
-rwxr-xr-x | gvnfmadapter/docker/docker-entrypoint.sh | 4 | ||||
-rwxr-xr-x | gvnfmadapter/docker/instance_config.sh | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/gvnfmadapter/docker/docker-entrypoint.sh b/gvnfmadapter/docker/docker-entrypoint.sh index 753f737..d89ef2e 100755 --- a/gvnfmadapter/docker/docker-entrypoint.sh +++ b/gvnfmadapter/docker/docker-entrypoint.sh @@ -14,8 +14,8 @@ echo "MSB_ADDR=$MSB_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/gvnfmadapter/docker/instance_config.sh b/gvnfmadapter/docker/instance_config.sh index 5debe45..8fa1249 100755 --- a/gvnfmadapter/docker/instance_config.sh +++ b/gvnfmadapter/docker/instance_config.sh @@ -4,6 +4,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/nfvo/driver/vnfm/gvnfm/gvnfmadapter/driver/pub/config/config.py +fi + if [ $MSB_IP ]; then sed -i "s|MSB_SERVICE_IP = .*|MSB_SERVICE_IP = '$MSB_IP'|" vfc/nfvo/driver/vnfm/gvnfm/gvnfmadapter/driver/pub/config/config.py fi |