From 2e259679732ed4e0464992b4cae04a4cf4d88000 Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Fri, 20 May 2016 13:24:15 +0100 Subject: bugfix: Remove dependency on ifconfig VSPERF uses ifconfig at several places to bring up a networking interface. However ifconfig has been deprecated by iproute2 package and it is not available in standard installation of many Linux distributions. Thus all calls of ifconfig have been replaced by call of 'ip' tool. Change-Id: I935eaf85b6082e4641d12cffea3e0882c634e5ea JIRA: VSPERF-299 Signed-off-by: Martin Klozik Reviewed-by: Maryam Tahhan Reviewed-by: Al Morton Reviewed-by: Christian Trautman Reviewed-by: Brian Castelli --- vnfs/qemu/qemu.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'vnfs/qemu') diff --git a/vnfs/qemu/qemu.py b/vnfs/qemu/qemu.py index 87f77583..2de8df2a 100644 --- a/vnfs/qemu/qemu.py +++ b/vnfs/qemu/qemu.py @@ -384,17 +384,23 @@ class IVnfQemu(IVnf): """ self._configure_disable_firewall() - self.execute('ifconfig ' + self._net1 + ' ' + - S.getValue('VANILLA_NIC1_IP_CIDR')[self._number]) + self.execute('ip addr add ' + + S.getValue('VANILLA_NIC1_IP_CIDR')[self._number] + + ' dev ' + self._net1) + self.execute('ip link set dev ' + self._net1 + ' up') - self.execute('ifconfig ' + self._net2 + ' ' + - S.getValue('VANILLA_NIC2_IP_CIDR')[self._number]) + self.execute('ip addr add ' + + S.getValue('VANILLA_NIC2_IP_CIDR')[self._number] + + ' dev ' + self._net2) + self.execute('ip link set dev ' + self._net2 + ' up') # configure linux bridge self.execute('brctl addbr br0') self.execute('brctl addif br0 ' + self._net1 + ' ' + self._net2) - self.execute('ifconfig br0 ' + - S.getValue('VANILLA_BRIDGE_IP')[self._number]) + self.execute('ip addr add ' + + S.getValue('VANILLA_BRIDGE_IP')[self._number] + + ' dev br0') + self.execute('ip link set dev br0 up') # Add the arp entries for the IXIA ports and the bridge you are using. # Use command line values if provided. -- cgit 1.2.3-korg