aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/qemu
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2016-11-11 08:04:54 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-11-11 08:04:54 +0000
commit9f3fce18b414e10724549dbee8113c6bdfa2f5db (patch)
treeca0cef2a6ec1ee810332dbba7121e4bb006a20a7 /vnfs/qemu
parent131fd1cccc824371fa3b1e7a8477818a03fa1d35 (diff)
parenteabc66eef336b3c47c366027b205d26db10a3c21 (diff)
Merge "cli: Modify configuration via CLI"
Diffstat (limited to 'vnfs/qemu')
-rw-r--r--vnfs/qemu/qemu.py34
-rw-r--r--vnfs/qemu/qemu_dpdk_vhost_user.py5
2 files changed, 9 insertions, 30 deletions
diff --git a/vnfs/qemu/qemu.py b/vnfs/qemu/qemu.py
index 51553277..997f93e0 100644
--- a/vnfs/qemu/qemu.py
+++ b/vnfs/qemu/qemu.py
@@ -24,7 +24,6 @@ import time
import pexpect
from conf import settings as S
-from conf import get_test_param
from vnfs.vnf.vnf import IVnf
class IVnfQemu(IVnf):
@@ -69,7 +68,6 @@ class IVnfQemu(IVnf):
self._nics = S.getValue('GUEST_NICS')[self._number][:nics_nr]
# set guest loopback application based on VNF configuration
- # cli option take precedence to config file values
self._guest_loopback = S.getValue('GUEST_LOOPBACK')[self._number]
self._testpmd_fwd_mode = S.getValue('GUEST_TESTPMD_FWD_MODE')[self._number]
@@ -81,11 +79,6 @@ class IVnfQemu(IVnf):
self._testpmd_fwd_mode, 'io')
self._testpmd_fwd_mode = 'io'
- guest_smp = int(get_test_param('guest_smp', 0))
- if guest_smp:
- override_list = [guest_smp] * (self._number + 1)
- S.setValue('GUEST_SMP', override_list)
-
name = 'Client%d' % self._number
vnc = ':%d' % self._number
# NOTE: affinization of main qemu process can cause hangup of 2nd VM
@@ -238,18 +231,14 @@ class IVnfQemu(IVnf):
stdin=proc.stdout)
proc.wait()
- guest_core_binding = int(get_test_param('guest_core_binding', 0))
for cpu in range(0, int(S.getValue('GUEST_SMP')[self._number])):
match = None
for line in output.decode(cur_locale).split('\n'):
match = re.search(thread_id % cpu, line)
if match:
- if guest_core_binding:
- self._affinitize_pid(guest_core_binding, match.group(1))
- else:
- self._affinitize_pid(
- S.getValue('GUEST_CORE_BINDING')[self._number][cpu],
- match.group(1))
+ self._affinitize_pid(
+ S.getValue('GUEST_CORE_BINDING')[self._number][cpu],
+ match.group(1))
break
if not match:
@@ -397,10 +386,9 @@ class IVnfQemu(IVnf):
self.execute_and_wait('make')
# get testpmd settings from CLI
- testpmd_params = get_test_param('guest_testpmd_params',
- S.getValue('GUEST_TESTPMD_PARAMS')[self._number])
+ testpmd_params = S.getValue('GUEST_TESTPMD_PARAMS')[self._number]
- self.execute_and_wait( './testpmd {}'.format(testpmd_params), 60, "Done")
+ self.execute_and_wait('./testpmd {}'.format(testpmd_params), 60, "Done")
self.execute('set fwd ' + self._testpmd_fwd_mode, 1)
self.execute_and_wait('start', 20, 'testpmd>')
@@ -458,17 +446,13 @@ class IVnfQemu(IVnf):
# Add the arp entries for the IXIA ports and the bridge you are using.
# Use command line values if provided.
- trafficgen_mac = get_test_param('vanilla_tgen_port1_mac',
- S.getValue('VANILLA_TGEN_PORT1_MAC'))
- trafficgen_ip = get_test_param('vanilla_tgen_port1_ip',
- S.getValue('VANILLA_TGEN_PORT1_IP'))
+ trafficgen_mac = S.getValue('VANILLA_TGEN_PORT1_MAC')
+ trafficgen_ip = S.getValue('VANILLA_TGEN_PORT1_IP')
self.execute('arp -s ' + trafficgen_ip + ' ' + trafficgen_mac)
- trafficgen_mac = get_test_param('vanilla_tgen_port2_mac',
- S.getValue('VANILLA_TGEN_PORT2_MAC'))
- trafficgen_ip = get_test_param('vanilla_tgen_port2_ip',
- S.getValue('VANILLA_TGEN_PORT2_IP'))
+ trafficgen_mac = S.getValue('VANILLA_TGEN_PORT2_MAC')
+ trafficgen_ip = S.getValue('VANILLA_TGEN_PORT2_IP')
self.execute('arp -s ' + trafficgen_ip + ' ' + trafficgen_mac)
diff --git a/vnfs/qemu/qemu_dpdk_vhost_user.py b/vnfs/qemu/qemu_dpdk_vhost_user.py
index a25c61ef..51c10242 100644
--- a/vnfs/qemu/qemu_dpdk_vhost_user.py
+++ b/vnfs/qemu/qemu_dpdk_vhost_user.py
@@ -18,7 +18,6 @@
import logging
from conf import settings as S
-from conf import get_test_param
from vnfs.qemu.qemu import IVnfQemu
class QemuDpdkVhostUser(IVnfQemu):
@@ -33,10 +32,6 @@ class QemuDpdkVhostUser(IVnfQemu):
self._logger = logging.getLogger(__name__)
# multi-queue values
- guest_nic_queues = int(get_test_param('guest_nic_queues', 0))
- if guest_nic_queues:
- override_list = [guest_nic_queues] * (self._number + 1)
- S.setValue('GUEST_NIC_QUEUES', override_list)
if int(S.getValue('GUEST_NIC_QUEUES')[self._number]):
queue_str = ',queues={}'.format(S.getValue('GUEST_NIC_QUEUES')[self._number])
mq_vector_str = ',mq=on,vectors={}'.format(