diff options
author | 2017-02-06 11:06:13 +0200 | |
---|---|---|
committer | 2017-02-06 11:06:13 +0200 | |
commit | 1570aea16299122399e14c7c281fe3d4259e63a7 (patch) | |
tree | 20d11950288fc2e5e3dd13ad4f0013ab6e09bdba /scripts/automation/trex_control_plane/stl/trex_stl_lib/utils | |
parent | 935de2a8ec8fce9f6b51cf10f7d4d1ed29625420 (diff) |
STL API scan6: If error at any port, raise error. If no error, return data per port.
Change-Id: I6592e890835fcbe16d35e6981de76c01999d6883
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/utils')
-rw-r--r-- | scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/common.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/common.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/common.py index 6b90a3b4..8ba98c71 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/common.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/common.py @@ -65,9 +65,14 @@ def get_number(input): def list_intersect(l1, l2): return list(filter(lambda x: x in l2, l1)) +# actually first list minus second def list_difference (l1, l2): return list(filter(lambda x: x not in l2, l1)) +# symmetric diff +def list_xor(l1, l2): + return list(set(l1) ^ set(l2)) + def is_sub_list (l1, l2): return set(l1) <= set(l2) |