summaryrefslogtreecommitdiffstats
path: root/testcases/testcase.py
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2015-12-03 12:58:03 +0000
committerMaryam Tahhan <maryam.tahhan@intel.com>2015-12-09 14:15:14 +0000
commit39ee5533feb7028f6fb7fce604f66b4451d434c7 (patch)
tree9f073f8b07d34f9267319c292705a65bf555341d /testcases/testcase.py
parenta05bfbc0bd553f761962634609d626085b3b3beb (diff)
testcase: scalability testcase enhancements
Streams used by scalability testcases can be simulated at different network layers by modification of destination MAC address (L2), destination IP address (L3) or destination UDP port (L4). It is possible to define number and type of the streams by testcase definition by options "MultiStream" and "Stream Type" or by CLI parameters "multistream" and "stream_type". CLI options override testcase definition. Number of streams, their types, used transport protocol and indication of pre-installed flows are written to both result CSV file and MD file with test report. Default transport protocol was changed to UDP because IxNetwork configuration script doesn't support TCP yet. Change-Id: I1ff9ab7756d38f65b1a7730397507c5a5ff5a3d1 JIRA: VSPERF-81 JIRA: VSPERF-82 Signed-off-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com>
Diffstat (limited to 'testcases/testcase.py')
-rw-r--r--testcases/testcase.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/testcases/testcase.py b/testcases/testcase.py
index b3ff2812..1bb7aba5 100644
--- a/testcases/testcase.py
+++ b/testcases/testcase.py
@@ -63,6 +63,15 @@ class TestCase(object):
else:
self.guest_loopback = S.getValue('GUEST_LOOPBACK').copy()
+ # read configuration of streams; CLI parameter takes precedence to
+ # testcase definition
+ multistream = cfg.get('MultiStream', 0)
+ multistream = get_test_param('multistream', multistream)
+ stream_type = cfg.get('Stream Type', 'L4')
+ stream_type = get_test_param('stream_type', stream_type)
+ pre_installed_flows = False # placeholder for VSPERF-83 implementation
+
+
# check if test requires background load and which generator it uses
self._load_cfg = cfg.get('Load', None)
if self._load_cfg and 'tool' in self._load_cfg:
@@ -80,7 +89,9 @@ class TestCase(object):
self._traffic.update({'traffic_type': cfg['Traffic Type'],
'flow_type': cfg.get('Flow Type', 'port'),
'bidir': cfg['biDirectional'],
- 'multistream': cfg.get('MultiStream', 0),
+ 'multistream': int(multistream),
+ 'stream_type': stream_type,
+ 'pre_installed_flows' : pre_installed_flows,
'frame_rate': int(framerate)})
# OVS Vanilla requires guest VM MAC address and IPs to work
@@ -238,6 +249,11 @@ class TestCase(object):
for item in results:
item[ResultsConstants.ID] = self.name
item[ResultsConstants.DEPLOYMENT] = self.deployment
+ item[ResultsConstants.TRAFFIC_TYPE] = self._traffic['l3']['proto']
+ if self._traffic['multistream']:
+ item[ResultsConstants.SCAL_STREAM_COUNT] = self._traffic['multistream']
+ item[ResultsConstants.SCAL_STREAM_TYPE] = self._traffic['stream_type']
+ item[ResultsConstants.SCAL_PRE_INSTALLED_FLOWS] = self._traffic['pre_installed_flows']
if len(self.guest_loopback):
item[ResultsConstants.GUEST_LOOPBACK] = ' '.join(self.guest_loopback)