summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2017-02-21 10:25:23 +0200
committerimarom <imarom@cisco.com>2017-02-21 10:25:23 +0200
commite37db2930e8c495e0f08bf0cb9b8529c0d88a3b3 (patch)
tree0b995a2443ab7bd3d06d738b7d7f8ed36eb70ea7
parent68cf31b303e7207c358aced1e27937b793e87f4d (diff)
fix streams show
Signed-off-by: imarom <imarom@cisco.com>
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py8
1 files changed, 7 insertions, 1 deletions
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():