diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-10-06 22:46:27 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-10-06 22:46:27 +0200 |
commit | 997acca4469731a41014a1aab9dafadbb847fd47 (patch) | |
tree | d9357570951cc480f69fa1cf4bba7f69fe036e94 /smoketest/scripts/cli/test_interfaces_ethernet.py | |
parent | 975eaa55f85a2855f5551447c9f120cca8815351 (diff) | |
download | vyos-1x-997acca4469731a41014a1aab9dafadbb847fd47.tar.gz vyos-1x-997acca4469731a41014a1aab9dafadbb847fd47.zip |
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.
Diffstat (limited to 'smoketest/scripts/cli/test_interfaces_ethernet.py')
-rwxr-xr-x | smoketest/scripts/cli/test_interfaces_ethernet.py | 8 |
1 files changed, 3 insertions, 5 deletions
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: |