diff options
author | 2015-11-23 14:10:19 +0200 | |
---|---|---|
committer | 2015-11-23 14:10:19 +0200 | |
commit | 54c1f0fc29b3d4580f7a13cffbe625fe88e37b16 (patch) | |
tree | 2651b973d3b24cbf0138dc08509986d470bd0e38 /scripts/automation/trex_control_plane/console/old_console.py | |
parent | bd8b640077591377375f2ab5ec6c542119ead0a2 (diff) |
add pause/resume into the console
Diffstat (limited to 'scripts/automation/trex_control_plane/console/old_console.py')
-rw-r--r-- | scripts/automation/trex_control_plane/console/old_console.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/automation/trex_control_plane/console/old_console.py b/scripts/automation/trex_control_plane/console/old_console.py index 93c7e3f4..9d61a3a6 100644 --- a/scripts/automation/trex_control_plane/console/old_console.py +++ b/scripts/automation/trex_control_plane/console/old_console.py @@ -636,6 +636,18 @@ class TRexConsole1(cmd.Cmd): res_ok = self.stop_traffic(port_list) return + def do_pause(self, line): + '''Pause active traffic in specified ports on TRex\n''' + parser = parsing_opts.gen_parser("stop", self.do_stop.__doc__, + parsing_opts.PORT_LIST_WITH_ALL) + opts = parser.parse_args(line.split()) + if opts is None: + # avoid further processing in this command + return + port_list = self.extract_port_list(opts) + res_ok = self.stop_traffic(port_list) + return + def help_stop(self): self.do_stop("-h") |