summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/console/trex_console.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/automation/trex_control_plane/console/trex_console.py')
-rwxr-xr-xscripts/automation/trex_control_plane/console/trex_console.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/automation/trex_control_plane/console/trex_console.py b/scripts/automation/trex_control_plane/console/trex_console.py
index ec23eb0c..bd79cb42 100755
--- a/scripts/automation/trex_control_plane/console/trex_console.py
+++ b/scripts/automation/trex_control_plane/console/trex_console.py
@@ -34,7 +34,6 @@ from common.text_opts import *
from client_utils.general_utils import user_input
-from client_utils.jsonrpc_client import TrexStatelessClient
import trex_status
from collections import namedtuple
@@ -177,6 +176,7 @@ class TRexConsole(cmd.Cmd):
dotext = 'do_'+text
return [a[3:]+' ' for a in self.get_names() if a.startswith(dotext)]
+
# set verbose on / off
def do_verbose (self, line):
'''Shows or set verbose mode\n'''
@@ -770,6 +770,10 @@ def setParserOptions():
default = 5050,
type = int)
+ parser.add_argument("-z", "--pub", help = "TRex Async Publisher Port [default is 4500]\n",
+ default = 4500,
+ type = int)
+
parser.add_argument("-u", "--user", help = "User Name [default is random generated]\n",
default = 'user_' + ''.join(random.choice(string.digits) for _ in range(5)),
type = str)
@@ -782,11 +786,10 @@ def setParserOptions():
def main():
parser = setParserOptions()
- options = parser.parse_args()#sys.argv[1:])
+ options = parser.parse_args()
# Stateless client connection
- # stateless_client = TrexStatelessClient(options.server, options.port, options.user)
- stateless_client = CTRexStatelessClient(options.user, options.server, options.port)
+ stateless_client = CTRexStatelessClient(options.user, options.server, options.port, options.pub)
# console
try: