summaryrefslogtreecommitdiffstats
path: root/gvnfmadapter/docker/instance_config.sh
diff options
context:
space:
mode:
authorying.yunlong <ying.yunlong@zte.com.cn>2017-09-06 10:19:34 +0800
committerying.yunlong <ying.yunlong@zte.com.cn>2017-09-06 10:19:34 +0800
commitaf6099d0f94f23d744131572aa34a1d51a123f43 (patch)
tree1745aa6362f9411814e7ddd5425bd8335823a22e /gvnfmadapter/docker/instance_config.sh
parentc8ad13d7b66512f320d806b0b5a2ef0d0703273c (diff)
Add gvnfm-driver dockerfile and build scripts
Change-Id: I5d95d3d00bc6417c6a42317263344d08bab2bc81 Issue-ID: VFC-285 Signed-off-by: ying.yunlong <ying.yunlong@zte.com.cn>
Diffstat (limited to 'gvnfmadapter/docker/instance_config.sh')
-rw-r--r--gvnfmadapter/docker/instance_config.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/gvnfmadapter/docker/instance_config.sh b/gvnfmadapter/docker/instance_config.sh
new file mode 100644
index 0000000..e025386
--- /dev/null
+++ b/gvnfmadapter/docker/instance_config.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+MSB_IP=`echo $MSB_ADDR | cut -d: -f 1`
+MSB_PORT=`echo $MSB_ADDR | cut -d: -f 2`
+
+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
+
+if [ $MSB_PORT ]; then
+ sed -i "s|MSB_SERVICE_PORT.*|MSB_SERVICE_PORT = '$MSB_PORT'|" vfc/nfvo/driver/vnfm/gvnfm/gvnfmadapter/driver/pub/config/config.py
+fi
+
+if [ $SERVICE_IP ]; then
+ sed -i "s|\"ip\": \".*\"|\"ip\": \"$SERVICE_IP\"|" vfc/nfvo/driver/vnfm/gvnfm/gvnfmadapter/driver/pub/config/config.py
+ sed -i "s|127\.0\.0\.1|$SERVICE_IP|" vfc/nfvo/driver/vnfm/gvnfm/gvnfmadapter/run.sh
+ sed -i "s|127\.0\.0\.1|$SERVICE_IP|" vfc/nfvo/driver/vnfm/gvnfm/gvnfmadapter/stop.sh
+fi
+
+cat vfc/nfvo/driver/vnfm/gvnfm/gvnfmadapter/driver/pub/config/config.py