summaryrefslogtreecommitdiffstats
path: root/gvnfmadapter/docker/instance_config.sh
blob: 5debe454f241f8c18b41fdf270b5e085e33a5d0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

MSB_PROTO=`echo $MSB_PROTO`
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_PROTO ]; then
    sed -i "s|MSB_SERVICE_PROTOCOL = .*|MSB_SERVICE_PROTOCOL = '$MSB_PROTO'|" 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
fi

cat vfc/nfvo/driver/vnfm/gvnfm/gvnfmadapter/driver/pub/config/config.py