summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/console
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-07-27 11:08:09 +0300
committerimarom <imarom@cisco.com>2016-07-27 16:01:13 +0300
commit344e3045d8346b4b204692e591e1556fc2333f97 (patch)
treec2a668f406c7f38136a2bb513ccf7dde765cfc3f /scripts/automation/trex_control_plane/stl/console
parenta5cc1c90587d859d5f1e7f6d9ee49024cd2e9481 (diff)
support for graceful shutdown
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/console')
-rwxr-xr-xscripts/automation/trex_control_plane/stl/console/trex_console.py5
-rw-r--r--scripts/automation/trex_control_plane/stl/console/trex_tui.py6
2 files changed, 9 insertions, 2 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 7ad0cfa4..110457d6 100755
--- a/scripts/automation/trex_control_plane/stl/console/trex_console.py
+++ b/scripts/automation/trex_control_plane/stl/console/trex_console.py
@@ -279,6 +279,11 @@ class TRexConsole(TRexGeneralCmd):
self.stateless_client.ping_line(line)
+ @verify_connected
+ def do_shutdown (self, line):
+ '''Sends the server a shutdown request\n'''
+ self.stateless_client.shutdown_line(line)
+
# set verbose on / off
def do_verbose(self, line):
'''Shows or set verbose mode\n'''
diff --git a/scripts/automation/trex_control_plane/stl/console/trex_tui.py b/scripts/automation/trex_control_plane/stl/console/trex_tui.py
index d3da738b..a69c4165 100644
--- a/scripts/automation/trex_control_plane/stl/console/trex_tui.py
+++ b/scripts/automation/trex_control_plane/stl/console/trex_tui.py
@@ -720,6 +720,7 @@ class AsyncKeysEngineConsole:
self.ac = {'start' : client.start_line,
'stop' : client.stop_line,
'pause' : client.pause_line,
+ 'push' : client.push_line,
'resume' : client.resume_line,
'update' : client.update_line,
'connect' : client.connect_line,
@@ -847,8 +848,9 @@ class AsyncKeysEngineConsole:
# handle TAB for completing filenames
def handle_tab_files (self, tokens):
- # we support only start command with files
- if tokens[0] != 'start':
+
+ # only commands with files
+ if tokens[0] not in {'start', 'push'}:
return
# '-f' with no paramters - no partial and use current dir