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>2017-03-30 17:20:40 +0300
committerimarom <imarom@cisco.com>2017-03-30 17:20:40 +0300
commit2c839ec5098bf1ad39ec574729891c622a485083 (patch)
tree30a3b4146c061e162177c851ff6096725498265f /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
parent9c9b15833e19fce0b265d8131b65f9a0cc52dd8b (diff)
check for service mode ports should be from among the acquired ports
only any non acquired ports should be ignored 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.py17
1 files changed, 11 insertions, 6 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 6f6e8bfd..b48732d6 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
@@ -1394,12 +1394,17 @@ class STLClient(object):
for port_id, port_obj in self.ports.items()
if port_obj.is_acquired() and port_obj.is_resolved()]
-
- def get_service_enabled_ports(self):
- return [port_id
- for port_id, port_obj in self.ports.items()
- if port_obj.is_service_mode_on()]
+ def get_service_enabled_ports(self, owned = True):
+ if owned:
+ return [port_id
+ for port_id, port_obj in self.ports.items()
+ if port_obj.is_service_mode_on() and port_obj.is_acquired()]
+ else:
+ return [port_id
+ for port_id, port_obj in self.ports.items()
+ if port_obj.is_service_mode_on()]
+
# get paused ports
def get_paused_ports (self, owned = True):
@@ -4562,4 +4567,4 @@ class STLClient(object):
return
- \ No newline at end of file
+