summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib')
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py3
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py5
2 files changed, 6 insertions, 2 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
index ec821f68..186771d8 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py
@@ -1392,7 +1392,8 @@ class STLClient(object):
if not rc:
raise STLError(rc)
- return [stream.get_id() for stream in streams]
+ # return the stream IDs
+ return rc.data()
@__api_check(True)
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 4529efa9..1ffeffe0 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
@@ -227,6 +227,7 @@ class Port(object):
rc = self.transmit_batch(batch)
+ ret = RC()
for i, single_rc in enumerate(rc):
if single_rc:
stream_id = batch[i].params['stream_id']
@@ -236,10 +237,12 @@ class Port(object):
'mode' : streams_list[i].get_mode(),
'rate' : streams_list[i].get_rate()}
+ ret.add(RC_OK(data = stream_id))
+
self.state = self.STATE_STREAMS if (len(self.streams) > 0) else self.STATE_IDLE
- return self.ok() if rc else self.err(str(rc))
+ return ret if rc else self.err(str(rc))