summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py7
1 files changed, 4 insertions, 3 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 6565f83a..9a2cfc07 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
@@ -1013,8 +1013,9 @@ class Port(object):
if sync:
self.sync_streams()
- data = {}
- for id, obj in self.streams.items():
+ data = OrderedDict()
+ for id in sorted(map(int, self.streams.keys())):
+ obj = self.streams[str(id)]
# lazy build scapy repr.
if not 'pkt_type' in obj:
@@ -1028,7 +1029,7 @@ class Port(object):
('next_stream', obj['next_id'] if not '-1' else 'None')
])
- return {"streams" : OrderedDict(sorted(data.items())) }
+ return {"streams" : data}
######## attributes are a complex type (dict) that might be manipulated through the async thread #############