diff options
author | imarom <imarom@cisco.com> | 2016-03-13 15:23:51 +0200 |
---|---|---|
committer | imarom <imarom@cisco.com> | 2016-03-13 15:23:51 +0200 |
commit | 17e720ee8611d950c56e3a873f0ac9cd2b235279 (patch) | |
tree | 3802d4bbbc4adb0ddd11b1e2e9d8bb92e18968e9 /scripts/automation | |
parent | cb4fc4381b85661658885c3c5f9e0bbcb1ce280a (diff) |
add_streams now returns the correct stream IDs which were allocated by the port
Diffstat (limited to 'scripts/automation')
-rw-r--r-- | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py | 3 | ||||
-rw-r--r-- | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py | 5 |
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)) |