summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-11-06 18:50:16 +0200
committerimarom <imarom@cisco.com>2016-11-06 18:50:16 +0200
commite85ea75669ea39e4f99519138a3a84e4df6eed2d (patch)
tree27e1563def12afc2ef03c369324aa2b03807cc76 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
parenta1ade6fd8e044b9866a8644db3519305539cfc61 (diff)
RX features
Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py')
-rwxr-xr-xscripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py37
1 files changed, 36 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 b9143896..2d5a6379 100755
--- 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
@@ -658,7 +658,7 @@ class STLClient(object):
return rc
-
+
def __add_streams(self, stream_list, port_id_list = None):
port_id_list = self.__ports(port_id_list)
@@ -830,6 +830,16 @@ class STLClient(object):
return rc
+ def __remove_rx_sniffer (self, port_id_list):
+ port_id_list = self.__ports(port_id_list)
+ rc = RC()
+
+ for port_id in port_id_list:
+ rc.add(self.ports[port_id].remove_rx_sniffer())
+
+ return rc
+
+
# connect to server
def __connect(self):
@@ -1875,7 +1885,13 @@ class STLClient(object):
self.stop(ports, rx_delay_ms = 0)
self.remove_all_streams(ports)
self.clear_stats(ports)
+ self.set_port_attr(ports,
+ promiscuous = False,
+ link_up = True,
+ rx_filter_mode = 'hw')
+ self.remove_rx_sniffer(ports)
+
@__api_check(True)
def remove_all_streams (self, ports = None):
@@ -2733,6 +2749,25 @@ class STLClient(object):
+ @__api_check(True)
+ def remove_rx_sniffer (self, ports = None, base_filename = 'rx_capture', limit = 1000):
+ """
+ Removes RX sniffer from port(s)
+
+ :raises:
+ + :exe:'STLError'
+
+ """
+ ports = ports if ports is not None else self.get_acquired_ports()
+ ports = self._validate_port_list(ports)
+
+ self.logger.pre_cmd("Removing RX sniffers on port(s) {0}:".format(ports))
+ rc = self.__remove_rx_sniffer(ports)
+ self.logger.post_cmd(rc)
+
+ if not rc:
+ raise STLError(rc)
+
def clear_events (self):
"""
Clear all events