diff options
Diffstat (limited to 'scripts/automation/trex_control_plane/console/trex_console.py')
-rwxr-xr-x | scripts/automation/trex_control_plane/console/trex_console.py | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/scripts/automation/trex_control_plane/console/trex_console.py b/scripts/automation/trex_control_plane/console/trex_console.py index 9d855f98..e187c8c2 100755 --- a/scripts/automation/trex_control_plane/console/trex_console.py +++ b/scripts/automation/trex_control_plane/console/trex_console.py @@ -33,10 +33,12 @@ from common.trex_streams import * from client.trex_stateless_client import CTRexStatelessClient from common.text_opts import * from client_utils.general_utils import user_input, get_current_user +from client_utils import parsing_opts import trex_status import parsing_opts from functools import wraps + __version__ = "1.1" @@ -362,7 +364,6 @@ class TRexConsole(TRexGeneralCmd): @verify_connected def do_reset (self, line): '''force stop all ports\n''' - self.stateless_client.cmd_reset_line(line) @@ -374,6 +375,22 @@ class TRexConsole(TRexGeneralCmd): self.stateless_client.cmd_validate_line(line) + def do_stats(self, line): + '''Fetch statistics from TRex server by port\n''' + self.stateless_client.cmd_stats_line(line) + + + def help_stats(self): + self.do_stats("-h") + + def do_clear(self, line): + '''Clear cached local statistics\n''' + self.stateless_client.cmd_clear_line(line) + + def help_clear(self): + self.do_clear("-h") + + def help_events (self): self.do_events("-h") |