diff options
author | 2015-11-24 11:54:58 +0200 | |
---|---|---|
committer | 2015-11-24 11:54:58 +0200 | |
commit | ac6f8e7c7c4e957a31c19c1fe4a0997009c6e733 (patch) | |
tree | 721101231fb692fed6028b21628cb861f3c64019 /scripts/automation/trex_control_plane/console | |
parent | 161a85c57c3d2a165e4fa94140d67db05714a7d3 (diff) | |
parent | 1e1c11059b7f7fcb5c160dffe2df832a8adf719d (diff) |
Merge branch 'master' of csi-sceasr-b45:/auto/proj-pcube-b/apps/PL-b/tools/repo//trex-core
Diffstat (limited to 'scripts/automation/trex_control_plane/console')
-rw-r--r-- | scripts/automation/trex_control_plane/console/old_console.py | 12 | ||||
-rwxr-xr-x | scripts/automation/trex_control_plane/console/trex_console.py | 10 |
2 files changed, 22 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") diff --git a/scripts/automation/trex_control_plane/console/trex_console.py b/scripts/automation/trex_control_plane/console/trex_console.py index 995965fd..2a6fd2eb 100755 --- a/scripts/automation/trex_control_plane/console/trex_console.py +++ b/scripts/automation/trex_control_plane/console/trex_console.py @@ -263,6 +263,16 @@ class TRexConsole(TRexGeneralCmd): '''stops port(s) transmitting traffic\n''' self.stateless_client.cmd_stop_line(line) + ############# pause + def do_pause(self, line): + '''pause port(s) transmitting traffic\n''' + self.stateless_client.cmd_pause_line(line) + + ############# resume + def do_resume(self, line): + '''resume port(s) transmitting traffic\n''' + self.stateless_client.cmd_resume_line(line) + def help_stop(self): |