summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_hltapi.py
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-05-29 11:07:53 +0300
committerYaroslav Brustinov <ybrustin@cisco.com>2016-05-29 11:07:53 +0300
commitc2ef504829e655253e38138cc0add99ff04788d6 (patch)
tree40b3efa40c4a9a3ecbe6a6faf483dba9433e628f /scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_hltapi.py
parent1df2f7b5b63c16955ea0bde6cc8e524e31ed0b79 (diff)
revert hltapi change
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_hltapi.py')
-rwxr-xr-xscripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_hltapi.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_hltapi.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_hltapi.py
index 0f68d4a3..464869aa 100755
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_hltapi.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_hltapi.py
@@ -1529,11 +1529,11 @@ def get_TOS(user_kwargs, kwargs):
TOS1 = set(['ip_precedence', 'ip_delay', 'ip_throughput', 'ip_reliability', 'ip_cost', 'ip_reserved'])
TOS2 = set(['ip_dscp', 'ip_cu'])
user_args = set(user_kwargs.keys())
- if user_args & TOS0.symmetric_difference(TOS1):
+ if user_args & (TOS1 - TOS0) and user_args & (TOS0 - TOS1):
raise STLError('You have mixed %s and %s TOS parameters' % (TOS0, TOS1))
- if user_args & TOS0.symmetric_difference(TOS2):
+ if user_args & (TOS2 - TOS0) and user_args & (TOS0 - TOS2):
raise STLError('You have mixed %s and %s TOS parameters' % (TOS0, TOS2))
- if user_args & TOS1.symmetric_difference(TOS2):
+ if user_args & (TOS2 - TOS1) and user_args & (TOS1 - TOS2):
raise STLError('You have mixed %s and %s TOS parameters' % (TOS1, TOS2))
if user_args & (TOS0 - TOS1 - TOS2):
return (kwargs['ip_precedence'] << 5) + (kwargs['ip_tos_field'] << 2) + kwargs['ip_mbz']