From 1570aea16299122399e14c7c281fe3d4259e63a7 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov <ybrustin@cisco.com> Date: Mon, 6 Feb 2017 11:06:13 +0200 Subject: 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> --- .../automation/trex_control_plane/stl/trex_stl_lib/utils/common.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/utils') 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) -- cgit