diff options
author | Christian Trautman <ctrautma@redhat.com> | 2016-06-26 15:13:38 -0400 |
---|---|---|
committer | Christian Trautman <ctrautma@redhat.com> | 2016-06-26 15:14:31 -0400 |
commit | 6c9279502beeeee90205488398001640103a522d (patch) | |
tree | 558e53055be654a1bcd0b6a2c328dec522bd8573 | |
parent | e04b1b9a22f93bb1783ff9e82486aec38dcb0efb (diff) |
xena_burst: Add Xena Burst traffic
Add Xena burst traffic functionality.
JIRA: VSPERF-263
Change-Id: I6336e5fcb33c0f66ee87f0f14f1b795937e3d00d
Signed-off-by: Christian Trautman <ctrautma@redhat.com>
-rwxr-xr-x | tools/pkt_gen/xena/xena.py | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/tools/pkt_gen/xena/xena.py b/tools/pkt_gen/xena/xena.py index 194de343..1cb843d4 100755 --- a/tools/pkt_gen/xena/xena.py +++ b/tools/pkt_gen/xena/xena.py @@ -485,22 +485,18 @@ class Xena(ITrafficGenerator): def send_burst_traffic(self, traffic=None, numpkts=100, duration=20): """Send a burst of traffic. - Send a ``numpkts`` packets of traffic, using ``traffic`` - configuration, with a timeout of ``time``. - - Attributes: - :param traffic: Detailed "traffic" spec, i.e. IP address, VLAN tags - :param numpkts: Number of packets to send - :param duration: Time to wait to receive packets - - :returns: dictionary of strings with following data: - - List of Tx Frames, - - List of Rx Frames, - - List of Tx Bytes, - - List of List of Rx Bytes, - - Payload Errors and Sequence Errors. + See ITrafficGenerator for description """ - raise NotImplementedError('Xena burst traffic not implemented') + self._duration = duration + + self._params.clear() + self._params['traffic'] = self.traffic_defaults.copy() + if traffic: + self._params['traffic'] = merge_spec(self._params['traffic'], + traffic) + + self._start_traffic_api(numpkts) + return self._stop_api_traffic() def send_cont_traffic(self, traffic=None, duration=20): """Send a continuous flow of traffic. |