summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/console/old_console.py
diff options
context:
space:
mode:
authorHanoh Haim <hhaim@cisco.com>2015-11-23 14:10:19 +0200
committerHanoh Haim <hhaim@cisco.com>2015-11-23 14:10:19 +0200
commit54c1f0fc29b3d4580f7a13cffbe625fe88e37b16 (patch)
tree2651b973d3b24cbf0138dc08509986d470bd0e38 /scripts/automation/trex_control_plane/console/old_console.py
parentbd8b640077591377375f2ab5ec6c542119ead0a2 (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.py12
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")