summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/client_utils
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2015-12-01 03:46:21 -0500
committerimarom <imarom@cisco.com>2015-12-01 03:47:51 -0500
commita48cd6471a2d82e5d78e8abe85b065f66a388e11 (patch)
tree1de45ed312a00790d3d8d741d8d51d4f94ac4202 /scripts/automation/trex_control_plane/client_utils
parentf2f7a6d3126044ac58f24ab8b07d4cba092554ca (diff)
1. fixed ZMQ message limitation
2. added some scale yamls for IMIX (300 streams, 1000 streams) 3. return objects are always complex objects (not strings) - for backward compatability 4. some minor adjustments to ZMQ socket timeouts
Diffstat (limited to 'scripts/automation/trex_control_plane/client_utils')
-rwxr-xr-xscripts/automation/trex_control_plane/client_utils/jsonrpc_client.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/automation/trex_control_plane/client_utils/jsonrpc_client.py b/scripts/automation/trex_control_plane/client_utils/jsonrpc_client.py
index b826f02f..a5789c46 100755
--- a/scripts/automation/trex_control_plane/client_utils/jsonrpc_client.py
+++ b/scripts/automation/trex_control_plane/client_utils/jsonrpc_client.py
@@ -37,7 +37,7 @@ class BatchMessage(object):
msg = json.dumps(self.batch_list)
- rc, resp_list = self.rpc_client.send_raw_msg(msg, block = False)
+ rc, resp_list = self.rpc_client.send_raw_msg(msg)
if len(self.batch_list) == 1:
return CmdResponse(True, [CmdResponse(rc, resp_list)])
else:
@@ -130,7 +130,6 @@ class JsonRpcClient(object):
self.socket.send(msg)
break
except zmq.Again:
- sleep(0.1)
tries += 1
if tries > 10:
self.disconnect()
@@ -143,7 +142,6 @@ class JsonRpcClient(object):
response = self.socket.recv()
break
except zmq.Again:
- sleep(0.1)
tries += 1
if tries > 10:
self.disconnect()
@@ -223,8 +221,8 @@ class JsonRpcClient(object):
except zmq.error.ZMQError as e:
return False, "ZMQ Error: Bad server or port name: " + str(e)
- self.socket.setsockopt(zmq.SNDTIMEO, 5)
- self.socket.setsockopt(zmq.RCVTIMEO, 5)
+ self.socket.setsockopt(zmq.SNDTIMEO, 1000)
+ self.socket.setsockopt(zmq.RCVTIMEO, 1000)
self.connected = True