# # "port" - flow is defined by ingress ports
# # "IP" - flow is defined by ingress ports
# # and src and dst IP addresses
+# "iLoad": 0-100 # Optional. Defines desired percentage
+# # of frame rate used during continuous stream
+# # tests. Can be overridden by cli option
+# # iload.
# "Load": dictionary # Optional. Configures background load
# # during testcase execution.
# Description of "Load" dictionary keys, their meanings and available values:
"Name": "phy2phy_cont",
"Traffic Type": "continuous",
"Deployment": "p2p",
- "Description": "RFC2544 Phy2Phy Continuous Stream",
+ "Description": "Phy2Phy Continuous Stream",
"biDirectional": "True",
+ "iLoad": "90",
+ },
+ {
+ "Name": "pvp_cont",
+ "Traffic Type": "continuous",
+ "Deployment": "pvp",
+ "Description": "PVP Continuous Stream",
+ "biDirectional": "True",
+ "iLoad": "90",
+ },
+ {
+ "Name": "pvvp_cont",
+ "Traffic Type": "continuous",
+ "Deployment": "pvvp",
+ "Description": "PVVP Continuous Stream",
+ "biDirectional": "True",
+ "iLoad": "90",
},
{
"Name": "phy2phy_scalability",
from tools.report import report
from conf import settings as S
from tools.pkt_gen.trafficgen.trafficgenhelper import TRAFFIC_DEFAULTS
+from conf import get_test_param
class TestCase(object):
"""TestCase base class
self.desc = cfg.get('Description', 'No description given.')
self.deployment = cfg['Deployment']
self._frame_mod = cfg.get('Frame Modification', None)
+ framerate = get_test_param('iload', None)
+ if framerate == None:
+ framerate = cfg.get('iLoad', 100)
# check if test requires background load and which generator it uses
self._load_cfg = cfg.get('Load', None)
self._traffic.update({'traffic_type': cfg['Traffic Type'],
'flow_type': cfg.get('Flow Type', 'port'),
'bidir': cfg['biDirectional'],
- 'multistream': cfg.get('MultiStream', 0)})
+ 'multistream': cfg.get('MultiStream', 0),
+ 'frame_rate': int(framerate)})
def run(self):
"""Run the test
"""
pass
- def send_burst_traffic(self, traffic=None, numpkts=100, time=20, framerate=100):
+ def send_burst_traffic(self, traffic=None, numpkts=100, time=20):
"""
Send a burst of traffic.
"""
return trafficgen.BurstResult(*results)
- def send_cont_traffic(self, traffic=None, time=20, framerate=0,
- multistream=False):
+ def send_cont_traffic(self, traffic=None, time=20, multistream=False):
"""
Send a continuous flow of traffic.
"""
results = get_user_traffic(
'continuous',
- '%dmS, %dmpps, multistream %s' % (time, framerate,
+ '%dmS, %dmpps, multistream %s' % (time, traffic['frame_rate'],
multistream), traffic_,
('frames tx', 'frames rx', 'min latency', 'max latency',
'avg latency'))
return result
- def send_burst_traffic(self, traffic=None, numpkts=100, time=20,
- framerate=100):
+ def send_burst_traffic(self, traffic=None, numpkts=100, time=20):
"""See ITrafficGenerator for description
"""
flow = {
'numpkts': numpkts,
'time': time,
'type': 'stopStream',
- 'framerate': framerate,
+ 'framerate': traffic['frame_rate'],
}
result = self._send_traffic(flow, traffic)
#TODO - implement Burst results setting via TrafficgenResults.
- def send_cont_traffic(self, traffic=None, time=20, framerate=100):
+ def send_cont_traffic(self, traffic=None, time=20, multistream=False):
"""See ITrafficGenerator for description
"""
flow = {
'numpkts': 100,
'time': time,
'type': 'contPacket',
- 'framerate': framerate,
+ 'framerate': traffic['frame_rate'],
'multipleStreams': traffic['multistream'],
}
return Ixia._create_result(result)
- def start_cont_traffic(self, traffic=None, time=20, framerate=100):
+ def start_cont_traffic(self, traffic=None, time=20):
"""See ITrafficGenerator for description
"""
- return self.send_cont_traffic(traffic, 0, framerate)
+ return self.send_cont_traffic(traffic, 0)
def stop_cont_traffic(self):
"""See ITrafficGenerator for description
return self.run_tcl('stopTraffic')
def send_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
- lossrate=0.0):
+ lossrate=0.0, multistream=False):
"""See ITrafficGenerator for description
"""
params = {}
"""
pass
- def send_cont_traffic(self, traffic=None, time=30, framerate=100):
+ def send_cont_traffic(self, traffic=None, time=30, multistream=False):
"""See ITrafficGenerator for description
"""
- self.start_cont_traffic(traffic, time, framerate)
+ self.start_cont_traffic(traffic, time)
return self.stop_cont_traffic()
- def start_cont_traffic(self, traffic=None, time=30, framerate=100):
+ def start_cont_traffic(self, traffic=None, time=30):
"""Start transmission.
"""
self._bidir = traffic['bidir']
self._params['config'] = {
'binary': False, # don't do binary search and send one stream
'time': time,
- 'framerate': framerate,
+ 'framerate': traffic['frame_rate'],
'multipleStreams': traffic['multistream'],
'rfc2544TestType': 'throughput',
}
return self._wait_result()
def send_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
- lossrate=0.0):
+ lossrate=0.0, multistream=False):
"""See ITrafficGenerator for description
"""
self.start_rfc2544_throughput(traffic, trials, duration, lossrate)
"""
raise NotImplementedError('Please call an implementation.')
- def send_burst_traffic(self, traffic=None, numpkts=100,
- time=20, framerate=100):
+ def send_burst_traffic(self, traffic=None, numpkts=100, time=20):
"""Send a burst of traffic.
Send a ``numpkts`` packets of traffic, using ``traffic``
Attributes:
:param traffic: Detailed "traffic" spec, i.e. IP address, VLAN tags
:param numpkts: Number of packets to send
- :param framerate: Expected framerate
:param time: Time to wait to receive packets
:returns: dictionary of strings with following data:
"""
raise NotImplementedError('Please call an implementation.')
- def send_cont_traffic(self, traffic=None, time=20, framerate=0):
+ def send_cont_traffic(self, traffic=None, time=20, multistream=False):
"""Send a continuous flow of traffic.
- Send packets at ``framerate``, using ``traffic`` configuration,
+ Send packets at given framerate, using ``traffic`` configuration,
until timeout ``time`` occurs.
:param traffic: Detailed "traffic" spec, i.e. IP address, VLAN tags
:param time: Time to wait to receive packets (secs)
- :param framerate: Expected framerate
:param multistream: Enable multistream output by overriding the
UDP port number in ``traffic`` with values
from 1 to 64,000
"""
raise NotImplementedError('Please call an implementation.')
- def start_cont_traffic(self, traffic=None, time=20, framerate=0):
+ def start_cont_traffic(self, traffic=None, time=20):
"""Non-blocking version of 'send_cont_traffic'.
Start transmission and immediately return. Do not wait for
raise NotImplementedError('Please call an implementation.')
def send_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
- lossrate=0.0):
+ lossrate=0.0, multistream=False):
"""Send traffic per RFC2544 throughput test specifications.
Send packets at a variable rate, using ``traffic``