diff options
author | 2016-02-11 08:15:33 -0500 | |
---|---|---|
committer | 2016-02-11 08:17:20 -0500 | |
commit | 268c7f125a8d51fa46a48de7104a3cfd7c50397e (patch) | |
tree | bf8d6aa8cd8d055841290f754a63b9398b9ad1cf /scripts/automation/trex_control_plane/stl/console | |
parent | f11bbb2d9c4f0e8fb5bf2a7b8d9ade597fc1be05 (diff) |
push support
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/console')
-rwxr-xr-x | scripts/automation/trex_control_plane/stl/console/trex_console.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/stl/console/trex_console.py b/scripts/automation/trex_control_plane/stl/console/trex_console.py index 789ad4ab..9e9dcf62 100755 --- a/scripts/automation/trex_control_plane/stl/console/trex_console.py +++ b/scripts/automation/trex_control_plane/stl/console/trex_console.py @@ -325,6 +325,13 @@ class TRexConsole(TRexGeneralCmd): def do_shell (self, line): return self.do_history(line) + def do_push (self, line): + '''Push a PCAP file\n''' + return self.stateless_client.push_line(line) + + def help_push (self): + return self.do_push("-h") + def do_history (self, line): '''Manage the command history\n''' @@ -385,6 +392,7 @@ class TRexConsole(TRexGeneralCmd): if (l > 2) and (s[l - 2] in file_flags): return TRexConsole.tree_autocomplete(s[l - 1]) + @verify_connected_and_rw def do_start(self, line): '''Start selected traffic in specified port(s) on TRex\n''' @@ -566,8 +574,9 @@ class TRexConsole(TRexGeneralCmd): print "----------------------------\n" cmds = [x[3:] for x in self.get_names() if x.startswith("do_")] + hidden = ['EOF', 'q', 'exit', 'h', 'shell'] for cmd in cmds: - if ( (cmd == "EOF") or (cmd == "q") or (cmd == "exit") or (cmd == "h")): + if cmd in hidden: continue try: |