From 54c1f0fc29b3d4580f7a13cffbe625fe88e37b16 Mon Sep 17 00:00:00 2001 From: Hanoh Haim Date: Mon, 23 Nov 2015 14:10:19 +0200 Subject: add pause/resume into the console --- scripts/automation/trex_control_plane/console/old_console.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'scripts/automation/trex_control_plane/console/old_console.py') 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") -- cgit