summaryrefslogtreecommitdiff
path: root/scripts/cli/test_interfaces_ethernet.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-02-17 20:48:13 +0100
committerChristian Poessinger <christian@poessinger.com>2020-02-17 21:04:08 +0100
commit7311b15f601a7aedae96f545f752b208153bb73f (patch)
treea494f54227d1d5c53ef1971bbac8bc82e6c1388e /scripts/cli/test_interfaces_ethernet.py
parentf95c1471f241f2c0a4d0dca5832a1636755ee391 (diff)
downloadvyos-1x-7311b15f601a7aedae96f545f752b208153bb73f.tar.gz
vyos-1x-7311b15f601a7aedae96f545f752b208153bb73f.zip
ethernet: automatically detect available interfaces
Diffstat (limited to 'scripts/cli/test_interfaces_ethernet.py')
-rwxr-xr-xscripts/cli/test_interfaces_ethernet.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/cli/test_interfaces_ethernet.py b/scripts/cli/test_interfaces_ethernet.py
index 330db08e0..f8eac6ec3 100755
--- a/scripts/cli/test_interfaces_ethernet.py
+++ b/scripts/cli/test_interfaces_ethernet.py
@@ -25,11 +25,11 @@ class EthernetInterfaceTest(BasicInterfaceTest.BaseTest):
self._test_mtu = True
self._interfaces = []
- # auto detect all ethernet interfaces
- for interface in list_interfaces_of_type("ethernet"):
- if '.' not in interface:
- self._interfaces.append(interface)
-
+ # we need to filter out VLAN interfaces identified by a dot (.)
+ # in their name - just in case!
+ for tmp in list_interfaces_of_type("ethernet"):
+ if not '.' in tmp:
+ self._interfaces.append(tmp)
if __name__ == '__main__':