summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
+