From e92507617ed8069b674fa5729b1e6a0c5d4b2662 Mon Sep 17 00:00:00 2001 From: imarom Date: Thu, 5 Nov 2015 09:55:03 +0200 Subject: bug fixes in status window --- .../trex_control_plane/client/trex_async_client.py | 3 ++- .../trex_control_plane/client/trex_stateless_client.py | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'scripts/automation/trex_control_plane/client') diff --git a/scripts/automation/trex_control_plane/client/trex_async_client.py b/scripts/automation/trex_control_plane/client/trex_async_client.py index 419448bb..72cce5aa 100644 --- a/scripts/automation/trex_control_plane/client/trex_async_client.py +++ b/scripts/automation/trex_control_plane/client/trex_async_client.py @@ -82,6 +82,8 @@ class TrexAsyncStatsPort(TrexAsyncStats): def __init__ (self): super(TrexAsyncStatsPort, self).__init__() + def get_stream_stats (self, stream_id): + return None # stats manager class TrexAsyncStatsManager(): @@ -101,7 +103,6 @@ class TrexAsyncStatsManager(): return self.port_stats[str(port_id)] - def update (self, snapshot): if snapshot['name'] == 'trex-global': 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 aeb25422..db51683a 100755 --- a/scripts/automation/trex_control_plane/client/trex_stateless_client.py +++ b/scripts/automation/trex_control_plane/client/trex_stateless_client.py @@ -254,7 +254,17 @@ class CTRexStatelessClient(object): self.ack_success_test) pass - @force_status(owned=True, active_and_owned=True) + + @force_status(owned=True)#, active_and_owned=True) + def get_all_streams(self, port_id, get_pkt = False): + if not self._is_ports_valid(port_id): + raise ValueError("Provided illegal port id input") + params = {"handler": self._conn_handler.get(port_id), + "port_id": port_id, + "get_pkt": get_pkt} + return self.transmit("get_all_streams", params) + + @force_status(owned=True)#, active_and_owned=True) def get_stream_id_list(self, port_id=None): if not self._is_ports_valid(port_id): raise ValueError("Provided illegal port id input") @@ -263,12 +273,13 @@ class CTRexStatelessClient(object): return self.transmit("get_stream_list", params) @force_status(owned=True, active_and_owned=True) - def get_stream(self, stream_id, port_id=None): + def get_stream(self, stream_id, port_id, get_pkt = False): if not self._is_ports_valid(port_id): raise ValueError("Provided illegal port id input") params = {"handler": self._conn_handler.get(port_id), "port_id": port_id, - "stream_id": stream_id} + "stream_id": stream_id, + "get_pkt": get_pkt} return self.transmit("get_stream_list", params) @force_status(owned=True) -- cgit