Page MenuHomeVyOS Platform

interfaces: smoketest: automatically detect "capabilities"
Closed, ResolvedPublicFEATURE REQUEST


Current state of vyos-1x smoketests have hardcoded features to test. The feature support is inside the base class BasicInterfaceTest

class BasicInterfaceTest:
    class TestCase(VyOSUnitTestSHIM.TestCase):
        _test_dhcp = False
        _test_ip = False
        _test_mtu = False
        _test_vlan = False
        _test_qinq = False
        _test_ipv6 = False
        _test_ipv6_pd = False
        _test_ipv6_dhcpc6 = False
        _test_mirror = False

And all derived classes need to enable the tests that are supported on this interface type. Adding new feature to a given interface (like vif support in T5237) require manually enabling those tests for the given interface.

It would make much more sense, if we can query the config backend for supported interface options - or in other words - is there a CLI node available that corresponds to set interfaces ethernet <name> vif - if that's the case, _test_vlan = True.

According to @jestabro something similar is already available as there is a packed config dict representing all the XML CLI nodes from vyos-1x.


Difficulty level
Unknown (require assessment)
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

c-po created this task.

Let me cherry-pick these and commit all at one

This comment was removed by jestabro.

One fix added; I'm looking at an extension for the case of test_vif_8021q_mtu_limits, as mentioned in the comment in

Added extension and example for test_vif_8021q_mtu_limits.

c-po changed the task status from Open to In progress.May 26 2023, 9:10 PM
c-po triaged this task as Normal priority.