diff options
author | 2016-01-18 22:00:51 +0200 | |
---|---|---|
committer | 2016-01-18 22:00:51 +0200 | |
commit | eee866f42bd0fc8472e6295b4f26bd0697e59f1f (patch) | |
tree | b16947052643d6a0c7dd20012f0a1d664d044444 /scripts/automation/trex_control_plane/client | |
parent | c88f411b3a69d6ea56c6b9758b10c30b87a6c94b (diff) |
regression:
corrections of benchmarks
move packet builder tests to functional folder
add CPU utilization boundries for more tests
print Skipping message
fix relative drop counting
API:
convert hostname to IP at init of client side (trex_client.py)
various:
move python path determination to external common file
add functional tests running bash script
add sudo check to t-rex-64
Diffstat (limited to 'scripts/automation/trex_control_plane/client')
-rwxr-xr-x | scripts/automation/trex_control_plane/client/trex_client.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/automation/trex_control_plane/client/trex_client.py b/scripts/automation/trex_control_plane/client/trex_client.py index 1d94dc06..9e3944d4 100755 --- a/scripts/automation/trex_control_plane/client/trex_client.py +++ b/scripts/automation/trex_control_plane/client/trex_client.py @@ -61,14 +61,17 @@ class CTRexClient(object): socket errors, in case server could not be reached. """ - self.trex_host = trex_host + try: + self.trex_host = socket.gethostbyname(trex_host) + except: # give it another try + self.trex_host = socket.gethostbyname(trex_host) self.trex_daemon_port = trex_daemon_port self.trex_zmq_port = trex_zmq_port self.seq = None self.verbose = verbose self.result_obj = CTRexResult(max_history_size) self.decoder = JSONDecoder() - self.trex_server_path = "http://{hostname}:{port}/".format( hostname = trex_host, port = trex_daemon_port ) + self.trex_server_path = "http://{hostname}:{port}/".format( hostname = self.trex_host, port = trex_daemon_port ) self.__verbose_print("Connecting to TRex @ {trex_path} ...".format( trex_path = self.trex_server_path ) ) self.history = jsonrpclib.history.History() self.server = jsonrpclib.Server(self.trex_server_path, history = self.history) |