summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-04-04 14:30:07 +0300
committerimarom <imarom@cisco.com>2016-04-10 12:37:18 +0300
commit1d62dfca8a6c7a3a54c8c08ef1a1332582ba38cb (patch)
tree9ebb45e94ce2d155269ebb18306692a4a7b11e31 /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
parent9ade0a9af71faa83ad26291a7f5c13733d2e66ec (diff)
activate client tests on all setups with restrictions
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py')
-rwxr-xr-xscripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
index 3ce876ad..165942d8 100755
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
@@ -361,6 +361,8 @@ class STLStream(object):
int_mac_dst_override_mode = int(mac_dst_override_mode);
+ self.is_default_mac = not (int_mac_src_override_by_pkt or int_mac_dst_override_mode)
+
self.fields['flags'] = (int_mac_src_override_by_pkt&1) + ((int_mac_dst_override_mode&3)<<1)
self.fields['action_count'] = action_count
@@ -421,6 +423,10 @@ class STLStream(object):
return self.id
+ def has_custom_mac_addr (self):
+ """ Return True if src or dst MAC were set as custom """
+ return not self.is_default_mac
+
def get_name (self):
""" Get the stream name """
return self.name
@@ -835,6 +841,9 @@ class STLProfile(object):
def is_pauseable (self):
return all([x.get_mode() == "Continuous" for x in self.get_streams()])
+ def has_custom_mac_addr (self):
+ return any([x.has_custom_mac_addr() for x in self.get_streams()])
+
def has_flow_stats (self):
return any([x.has_flow_stats() for x in self.get_streams()])