summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/client/trex_stateless_client.py
diff options
context:
space:
mode:
authorDan Klein <danklei@cisco.com>2015-10-29 06:18:54 +0200
committerDan Klein <danklei@cisco.com>2015-10-29 06:18:54 +0200
commitd78150a66de591a77df2496e5de828d3232a931a (patch)
treeba1fd214aed36a691c25d267b71d8d8cc1203255 /scripts/automation/trex_control_plane/client/trex_stateless_client.py
parent13c353b9e4f3f0177458c5bef729de31ec03135d (diff)
Awesome working start/stop traffic console
Fixed more stability issues :) Ready for merging.
Diffstat (limited to 'scripts/automation/trex_control_plane/client/trex_stateless_client.py')
-rwxr-xr-xscripts/automation/trex_control_plane/client/trex_stateless_client.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/automation/trex_control_plane/client/trex_stateless_client.py b/scripts/automation/trex_control_plane/client/trex_stateless_client.py
index 0fff9b36..4e861585 100755
--- a/scripts/automation/trex_control_plane/client/trex_stateless_client.py
+++ b/scripts/automation/trex_control_plane/client/trex_stateless_client.py
@@ -62,8 +62,8 @@ class CTRexStatelessClient(object):
continue
if bad_ids:
# Some port IDs are not according to desires status
- raise RuntimeError("The requested method ('{0}') cannot be invoked since port IDs {1} are not "
- "at allowed stated".format(func.__name__, list(bad_ids)))
+ raise ValueError("The requested method ('{0}') cannot be invoked since port IDs {1} are not "
+ "at allowed states".format(func.__name__, list(bad_ids)))
else:
return func(self, *args, **kwargs)
return wrapper_f
@@ -127,6 +127,9 @@ class CTRexStatelessClient(object):
def get_acquired_ports(self):
return self._conn_handler.keys()
+ def get_active_ports(self):
+ return list(self._active_ports)
+
def acquire(self, port_id, force=False):
if not self._is_ports_valid(port_id):
raise ValueError("Provided illegal port id input")