summaryrefslogtreecommitdiffstats
path: root/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/common.py
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-11-22 17:16:36 +0200
committerimarom <imarom@cisco.com>2016-11-22 17:16:36 +0200
commit75585e213de850395b6bcd0aff0841cd9cced92c (patch)
treefc2733edff683748929317a610c83fc33cb7935f /scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/common.py
parent6c18d6a2173ff2f3ecd031046077cd65d3ed8785 (diff)
RX features - few tweaks
Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/common.py')
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/common.py10
1 files changed, 10 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 02e13fd7..cbbacb27 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
@@ -98,3 +98,13 @@ def is_valid_ipv4 (addr):
def is_valid_mac (mac):
return bool(re.match("[0-9a-f]{2}([-:])[0-9a-f]{2}(\\1[0-9a-f]{2}){4}$", mac.lower()))
+def list_remove_dup (l):
+ tmp = list()
+
+ for x in l:
+ if not x in tmp:
+ tmp.append(x)
+
+ return tmp
+
+