From 997acca4469731a41014a1aab9dafadbb847fd47 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 6 Oct 2022 22:46:27 +0200 Subject: smoketest: ethernet: use ifconfig API for VLAN detection on test initialisation Section.interfaces() now as an option if it should return also VLAN interfaces or not. No need to keep a custom logic for it. --- smoketest/scripts/cli/test_interfaces_ethernet.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'smoketest/scripts') diff --git a/smoketest/scripts/cli/test_interfaces_ethernet.py b/smoketest/scripts/cli/test_interfaces_ethernet.py index feb2c0268..ed611062a 100755 --- a/smoketest/scripts/cli/test_interfaces_ethernet.py +++ b/smoketest/scripts/cli/test_interfaces_ethernet.py @@ -120,15 +120,13 @@ class EthernetInterfaceTest(BasicInterfaceTest.TestCase): cls._base_path = ['interfaces', 'ethernet'] cls._mirror_interfaces = ['dum21354'] - # we need to filter out VLAN interfaces identified by a dot (.) - # in their name - just in case! + # We only test on physical interfaces and not VLAN (sub-)interfaces if 'TEST_ETH' in os.environ: tmp = os.environ['TEST_ETH'].split() cls._interfaces = tmp else: - for tmp in Section.interfaces('ethernet'): - if not '.' in tmp: - cls._interfaces.append(tmp) + for tmp in Section.interfaces('ethernet', vlan=False): + cls._interfaces.append(tmp) cls._macs = {} for interface in cls._interfaces: -- cgit v1.2.3