diff options
author | imarom <imarom@cisco.com> | 2016-03-29 15:27:20 +0200 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-03-31 15:51:17 +0300 |
commit | fc4620422d79d218170aad12fc55fa4a98076c13 (patch) | |
tree | 3a4a50d55016cf84c69305e7b02f32a3b269a8fb /scripts/automation | |
parent | d4791e0535ef56688f421d6ac3dbd79c33a37508 (diff) |
RX stats wait_on_traffic
Diffstat (limited to 'scripts/automation')
-rw-r--r-- | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py index f6b5d49c..812aea98 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py @@ -1809,7 +1809,7 @@ class STLClient(object): @__api_check(True) - def wait_on_traffic (self, ports = None, timeout = 60): + def wait_on_traffic (self, ports = None, timeout = 60, rx_delay_ms = 10): """ block until specify port(s) traffic has ended @@ -1820,6 +1820,14 @@ class STLClient(object): timeout : int timeout in seconds + rx_delay_ms : int + time to wait until RX filters are removed + this value should reflect the time it takes + packets which were transmitted to arrive + to the destination. + after this time the RX filters will be removed + + :raises: + :exc:`STLTimeoutError` - in case timeout has expired + :exe:'STLError' @@ -1838,6 +1846,11 @@ class STLClient(object): if time.time() > expr: raise STLTimeoutError(timeout) + # remove any RX filters + rc = self._remove_rx_filters(ports, rx_delay_ms = rx_delay_ms) + if not rc: + raise STLError(rc) + @__api_check(True) def set_port_attr (self, ports = None, promiscuous = None): |