From e37db2930e8c495e0f08bf0cb9b8529c0d88a3b3 Mon Sep 17 00:00:00 2001 From: imarom Date: Tue, 21 Feb 2017 10:25:23 +0200 Subject: fix streams show Signed-off-by: imarom --- .../trex_control_plane/stl/trex_stl_lib/trex_stl_port.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py index b87a8a5a..6565f83a 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py @@ -191,6 +191,9 @@ class Port(object): # sync all the streams with the server def sync_streams (self): + + self.streams = {} + params = {"port_id": self.port_id} rc = self.transmit("get_all_streams", params) @@ -1003,10 +1006,13 @@ class Port(object): return self.port_stats.invalidate() ################# stream printout ###################### - def generate_loaded_streams_sum(self): + def generate_loaded_streams_sum(self, sync = True): if self.state == self.STATE_DOWN: return {} + if sync: + self.sync_streams() + data = {} for id, obj in self.streams.items(): -- cgit 1.2.3-korg