From 4a41c26a5cf23635a5b1332af6e806c915cf7e6c Mon Sep 17 00:00:00 2001 From: imarom Date: Wed, 25 Nov 2015 04:46:56 -0500 Subject: support for "total" flag for start also fixed a bug in mpps (trex console) --- .../automation/trex_control_plane/client/trex_stateless_client.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/automation/trex_control_plane/client/trex_stateless_client.py') diff --git a/scripts/automation/trex_control_plane/client/trex_stateless_client.py b/scripts/automation/trex_control_plane/client/trex_stateless_client.py index af166b7f..30550ca3 100755 --- a/scripts/automation/trex_control_plane/client/trex_stateless_client.py +++ b/scripts/automation/trex_control_plane/client/trex_stateless_client.py @@ -880,6 +880,7 @@ class CTRexStatelessClient(object): "start", self.cmd_start_line.__doc__, parsing_opts.PORT_LIST_WITH_ALL, + parsing_opts.TOTAL, parsing_opts.FORCE, parsing_opts.STREAM_FROM_PATH_OR_FILE, parsing_opts.DURATION, @@ -906,6 +907,10 @@ class CTRexStatelessClient(object): return RC_ERR("Failed to load stream pack") + if opts.total: + # if total was set - divide it between the ports + opts.mult['max'] = opts.mult['max'] / len(opts.ports) + return self.cmd_start(opts.ports, stream_list, opts.mult, opts.force, opts.duration) def cmd_stop_line (self, line): -- cgit 1.2.3-korg