diff options
author | yangyan <yangyanyj@chinamobile.com> | 2019-08-02 16:44:11 +0800 |
---|---|---|
committer | yangyan <yangyanyj@chinamobile.com> | 2019-08-02 16:44:19 +0800 |
commit | 529ef4bd2a9c8b57475226cdcb5d278c22509a1e (patch) | |
tree | c46e8d57439c666c6de40ba627e52d45c02ad48a | |
parent | 88059a9fda631178db0e0719946ae01da1d275de (diff) |
Change the MSB registration switch to the environment variable acquisition mode
Change-Id: I844c01dae1a7e361e7f7340d6b62cb56c40c87fa
Issue-ID: VFC-1466
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
-rwxr-xr-x | docker/instance_config.sh | 6 | ||||
-rw-r--r-- | lcm/pub/config/config.py | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/docker/instance_config.sh b/docker/instance_config.sh index 099b0082..70a3cc6a 100755 --- a/docker/instance_config.sh +++ b/docker/instance_config.sh @@ -6,6 +6,12 @@ MSB_PORT=`echo $MSB_ADDR | cut -d: -f 2` MR_IP=`echo $MR_ADDR | cut -d: -f 1` MR_PORT=`echo $MR_ADDR | cut -d: -f 2` +REG_TO_MSB_WHEN_START=$REG_TO_MSB_WHEN_START + +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/lcm/lcm/pub/config/config.py +fi + if [ $MSB_IP ]; then sed -i "s|MSB_SERVICE_IP = .*|MSB_SERVICE_IP = '$MSB_IP'|" vfc/nfvo/lcm/lcm/pub/config/config.py fi diff --git a/lcm/pub/config/config.py b/lcm/pub/config/config.py index 0f699d81..021b1b79 100644 --- a/lcm/pub/config/config.py +++ b/lcm/pub/config/config.py @@ -35,7 +35,7 @@ FORWARDED_FOR_FIELDS = ["HTTP_X_FORWARDED_FOR", "HTTP_X_FORWARDED_HOST", "HTTP_X_FORWARDED_SERVER"] # [register] -REG_TO_MSB_WHEN_START = True +REG_TO_MSB_WHEN_START = False REG_TO_MSB_REG_URL = "/api/microservices/v1/services" REG_TO_MSB_REG_PARAM = { "serviceName": "nslcm", |