aboutsummaryrefslogtreecommitdiffstats
path: root/testcases
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2015-12-16 12:36:04 +0000
committerMaryam Tahhan <maryam.tahhan@intel.com>2015-12-23 10:33:34 +0000
commit088bbb8cff4a84751198675b118f65fabf7ef672 (patch)
tree2fd6a7acf61f391006741fe874e842c847eeaeae /testcases
parent02baa4fd66df2dc9d6975b97bde997b3a367f169 (diff)
vnf: support of vloop_vnf VM
Additional modifications are required to support vloop_vnf as a master VM image for PVP and PVVP deployments. Firewall is disabled directly by call of iptables to avoid dependency on distribution specific firewall handling. Default configuration values in 04_vnf.conf were set according to vloop_vnf to make its usage easy. Values are generic enough to work well also with other images. Parameters VANILLA_NICx_NAME and vanilla_nicx_name were renamed to GUEST_NICx_NAME and guest_nicx_name respectively, because they are used for all vswitch versions. Functionality of CLI options was fixed. Default values of GUEST_NICx_NAME were changed to work with vloop_vnf image. Bug with modification of TRAFFIC_DEFAULTS values has been fixed. Deep copy is used and l2 and l3 dictionaries are correctly updated to avoid issues. Qemu disc emulation has been set to SCSI again to avoid error messages related to non-functional DMA in syslog. Appropriate kernel modules were added into vloop_vnf to support scsi disk emulation during boot. Change-Id: I5901f454861f99d21cca03030d6d5468ab71a8af JIRA: VSPERF-133 Signed-off-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Brian Castelli <brian.castelli@spirent.com> Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Gurpreet Singh <gurpreet.singh@spirent.com> Reviewed-by: Tv Rao <tv.rao@freescale.com>
Diffstat (limited to 'testcases')
-rw-r--r--testcases/testcase.py47
1 files changed, 25 insertions, 22 deletions
diff --git a/testcases/testcase.py b/testcases/testcase.py
index 1bb7aba5..986fbe4b 100644
--- a/testcases/testcase.py
+++ b/testcases/testcase.py
@@ -18,6 +18,7 @@ import csv
import os
import logging
import subprocess
+import copy
from collections import OrderedDict
from core.results.results_constants import ResultsConstants
@@ -85,7 +86,7 @@ class TestCase(object):
self._results_dir = results_dir
# set traffic details, so they can be passed to vswitch and traffic ctls
- self._traffic = TRAFFIC_DEFAULTS.copy()
+ self._traffic = copy.deepcopy(TRAFFIC_DEFAULTS)
self._traffic.update({'traffic_type': cfg['Traffic Type'],
'flow_type': cfg.get('Flow Type', 'port'),
'bidir': cfg['biDirectional'],
@@ -96,10 +97,10 @@ class TestCase(object):
# OVS Vanilla requires guest VM MAC address and IPs to work
if 'linux_bridge' in self.guest_loopback:
- self._traffic['l2'] = {'srcmac': S.getValue('GUEST_NET2_MAC')[0],
- 'dstmac': S.getValue('GUEST_NET1_MAC')[0]}
- self._traffic['l3'] = {'srcip': S.getValue('VANILLA_TGEN_PORT1_IP'),
- 'dstip': S.getValue('VANILLA_TGEN_PORT2_IP')}
+ self._traffic['l2'].update({'srcmac': S.getValue('GUEST_NET2_MAC')[0],
+ 'dstmac': S.getValue('GUEST_NET1_MAC')[0]})
+ self._traffic['l3'].update({'srcip': S.getValue('VANILLA_TGEN_PORT1_IP'),
+ 'dstip': S.getValue('VANILLA_TGEN_PORT2_IP')})
def run(self):
"""Run the test
@@ -109,8 +110,7 @@ class TestCase(object):
self._logger.debug(self.name)
# copy sources of l2 forwarding tools into VM shared dir if needed
- if 'testpmd' in self.guest_loopback or 'l2fwd' in self.guest_loopback:
- self._copy_fwd_tools_for_guest()
+ self._copy_fwd_tools_for_guest()
self._logger.debug("Controllers:")
loader = Loader()
@@ -267,24 +267,27 @@ class TestCase(object):
while counter < self.deployment.count('v'):
guest_dir = S.getValue('GUEST_SHARE_DIR')[counter]
+ # create shared dir if it doesn't exist
if not os.path.exists(guest_dir):
os.makedirs(guest_dir)
- try:
- tasks.run_task(['rsync', '-a', '-r', '-l', r'--exclude="\.git"',
- os.path.join(S.getValue('RTE_SDK'), ''),
- os.path.join(guest_dir, 'DPDK')],
- self._logger,
- 'Copying DPDK to shared directory...',
- True)
- tasks.run_task(['rsync', '-a', '-r', '-l',
- os.path.join(S.getValue('ROOT_DIR'), 'src/l2fwd/'),
- os.path.join(guest_dir, 'l2fwd')],
- self._logger,
- 'Copying l2fwd to shared directory...',
- True)
- except subprocess.CalledProcessError:
- self._logger.error('Unable to copy DPDK and l2fwd to shared directory')
+ # copy sources into shared dir only if neccessary
+ if 'testpmd' in self.guest_loopback or 'l2fwd' in self.guest_loopback:
+ try:
+ tasks.run_task(['rsync', '-a', '-r', '-l', r'--exclude="\.git"',
+ os.path.join(S.getValue('RTE_SDK'), ''),
+ os.path.join(guest_dir, 'DPDK')],
+ self._logger,
+ 'Copying DPDK to shared directory...',
+ True)
+ tasks.run_task(['rsync', '-a', '-r', '-l',
+ os.path.join(S.getValue('ROOT_DIR'), 'src/l2fwd/'),
+ os.path.join(guest_dir, 'l2fwd')],
+ self._logger,
+ 'Copying l2fwd to shared directory...',
+ True)
+ except subprocess.CalledProcessError:
+ self._logger.error('Unable to copy DPDK and l2fwd to shared directory')
counter += 1