summaryrefslogtreecommitdiffstats
path: root/nfvbenchvm/dib
diff options
context:
space:
mode:
authorfmenguy <francoisregis.menguy@orange.com>2020-01-22 16:00:48 +0100
committerfmenguy <francoisregis.menguy@orange.com>2020-01-23 15:40:20 +0100
commitae838f98fa020d0ad0aa37ab58e02456889c3375 (patch)
treefff47c59632bf76053df08c860ded46fccafd1a2 /nfvbenchvm/dib
parent95f2491ed89ac99b0d8bd006b4a13cbeb1eb96ce (diff)
NFVBENCH-157 Add possibility to not use the ARP static configuration for VPP loop VM
Change-Id: Ifd3f183345e21c7866e9e9898c7bbda601793b2c Signed-off-by: fmenguy <francoisregis.menguy@orange.com>
Diffstat (limited to 'nfvbenchvm/dib')
-rwxr-xr-xnfvbenchvm/dib/build-image.sh2
-rw-r--r--nfvbenchvm/dib/elements/nfvbenchvm/static/etc/rc.d/rc.local14
2 files changed, 13 insertions, 3 deletions
diff --git a/nfvbenchvm/dib/build-image.sh b/nfvbenchvm/dib/build-image.sh
index 09ccf6a..87c1169 100755
--- a/nfvbenchvm/dib/build-image.sh
+++ b/nfvbenchvm/dib/build-image.sh
@@ -30,7 +30,7 @@ set -e
gs_url=artifacts.opnfv.org/nfvbench/images
# image version number
-__version__=0.11
+__version__=0.12
image_name=nfvbenchvm_centos-$__version__
# if image exists skip building
diff --git a/nfvbenchvm/dib/elements/nfvbenchvm/static/etc/rc.d/rc.local b/nfvbenchvm/dib/elements/nfvbenchvm/static/etc/rc.d/rc.local
index 64557d4..d69cd0e 100644
--- a/nfvbenchvm/dib/elements/nfvbenchvm/static/etc/rc.d/rc.local
+++ b/nfvbenchvm/dib/elements/nfvbenchvm/static/etc/rc.d/rc.local
@@ -211,12 +211,22 @@ if [ $PCI_ADDRESS_1 ] && [ $PCI_ADDRESS_2 ]; then
INTFS=`vppctl show int | grep Ethernet | xargs`
INTF_1=`echo $INTFS | awk '{ print $1 }'`
INTF_2=`echo $INTFS | awk '{ print $4 }'`
+ if [ -z "${TG_MAC1}" ]; then
+ # vm.conf does not support lines commented with #, so
+ # we need to remove the line to set the static ARP entry.
+ sed -i "/{{TG_MAC1}}/d" /etc/vpp/vm.conf
+ else
+ sed -i "s/{{TG_MAC1}}/${TG_MAC1}/g" /etc/vpp/vm.conf
+ fi
+ if [ -z "${TG_MAC2}" ]; then
+ sed -i "/{{TG_MAC2}}/d" /etc/vpp/vm.conf
+ else
+ sed -i "s/{{TG_MAC2}}/${TG_MAC2}/g" /etc/vpp/vm.conf
+ fi
sed -i "s/{{INTF_1}}/${INTF_1//\//\/}/g" /etc/vpp/vm.conf
sed -i "s/{{INTF_2}}/${INTF_2//\//\/}/g" /etc/vpp/vm.conf
sed -i "s/{{VNF_GATEWAY1_CIDR}}/${VNF_GATEWAY1_CIDR//\//\/}/g" /etc/vpp/vm.conf
sed -i "s/{{VNF_GATEWAY2_CIDR}}/${VNF_GATEWAY2_CIDR//\//\/}/g" /etc/vpp/vm.conf
- sed -i "s/{{TG_MAC1}}/${TG_MAC1}/g" /etc/vpp/vm.conf
- sed -i "s/{{TG_MAC2}}/${TG_MAC2}/g" /etc/vpp/vm.conf
sed -i "s/{{TG_NET1}}/${TG_NET1//\//\/}/g" /etc/vpp/vm.conf
sed -i "s/{{TG_NET2}}/${TG_NET2//\//\/}/g" /etc/vpp/vm.conf
sed -i "s/{{TG_GATEWAY1_IP}}/${TG_GATEWAY1_IP}/g" /etc/vpp/vm.conf