summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2017-01-22 16:20:45 +0200
committerimarom <imarom@cisco.com>2017-01-22 16:20:45 +0200
commit904eacd9be1230efb7ae0ab7997ec131b588ec8a (patch)
tree8e4bcd1b1a5f683efdb8f3eeb962acefc3201961 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
parentd2f1c8451e2e8ffc47b208f68f9b16697d706d60 (diff)
parentb81cdb6c2d6d118c1c346e7c8dae6a5e747d867d (diff)
Merge branch 'master' into capture
Signed-off-by: imarom <imarom@cisco.com> Conflicts: scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_client.py scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_jsonrpc_client.py scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py src/main_dpdk.cpp
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py')
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
index 654514cb..31d752af 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_port.py
@@ -267,7 +267,7 @@ class Port(object):
def add_streams (self, streams_list):
# listify
- streams_list = streams_list if isinstance(streams_list, list) else [streams_list]
+ streams_list = listify(streams_list)
lookup = {}
@@ -341,7 +341,7 @@ class Port(object):
def remove_streams (self, stream_id_list):
# single element to list
- stream_id_list = stream_id_list if isinstance(stream_id_list, list) else [stream_id_list]
+ stream_id_list = listify(stream_id_list)
# verify existance
if not all([stream_id in self.streams for stream_id in stream_id_list]):
@@ -736,7 +736,7 @@ class Port(object):
"slave_handler": slave_handler,
"min_ipg_usec": min_ipg_usec if min_ipg_usec else 0}
- rc = self.transmit("push_remote", params)
+ rc = self.transmit("push_remote", params, retry = 4)
if rc.bad():
return self.err(rc.err())
@@ -908,6 +908,10 @@ class Port(object):
def get_layer_cfg (self):
return self.__attr['layer_cfg']
+
+ def is_virtual(self):
+ return self.info.get('is_virtual')
+
def is_l3_mode (self):
return self.get_layer_cfg()['ipv4']['state'] != 'none'