Age | Commit message (Collapse) | Author |
|
Instead of using an Adapter pattern to make interfaces VLAN-aware, create a
derived class named VLANIf to represent a VLAN. This change was necessary to
eliminate mixed code in Interfaces class which was VLAN - free, but recently
gained some VLAN specific code for set_admin_state().
In addition this "autoresolves" the issue in T2894 as a bond vlan interface
will no longer change the lower interface.
|
|
|
|
|
|
This is required as other interfaces (e.g. pseudo-ethernet or bond) will have
VLANs, too.
|
|
Every derived class must implement update() to set the interfaces admin
up/down state. This is required to prevend extensive link flaps when e.g.
reconfiguring bond interfaces.
|
|
This test is reused by a lot of instances and thus must be moved to the
base class.
|
|
The current VyOS CLI parser code written in Python contains a ton of duplicates
which I can also hold myself accountable for - or maybe mainly me - depends on
the angle of judge.
While providing a new update() method in vyos.ifconfig.interfaces() this is
extended for bridge interfaces in the derived bridge class.
Signed-off-by: Christian Poessinger <christian@poessinger.com>
|
|
The current VyOS CLI parser code written in Python contains a ton of duplicates
which I can also hold myself accountable for - or maybe mainly me - depends on
the angle of judge.
While providing a new update() method in vyos.ifconfig.interfaces() this is
extended for ethernet based interfaces which also supports 802.1q, 802.1ad
VLANs. This commit migrates the existing codebase for an ethernet based
interfaces and implements the missing parts for VLANs. Adding or migrating other
interfaces (e.g. bridge or bond) will become much easier as they must reuse
the entire functionality - we now walk towards a single codepath.
Thanks for all who made this combined effort possible!
Signed-off-by: Christian Poessinger <christian@poessinger.com>
|
|
|
|
|
|
|
|
Not all interface are capable of all features. Since commands are
now checked for valid completion, ethtool command failure must
be ignored.
|
|
the result of the commands used to setup the interface is now checked.
flowcontrol can not always be set on all interfaces, and when/if it
fails, it prevents the interace to come up. This is problematic as it
may prevent the router to come up. Therefore flowcontrol must be
allowed to fail gracefully/silently.
|
|
ifconfig: T2057: break down DHCP, add register, STP and VLAN as adapters
|
|
* Add xen_netfront to the list of interface types that will error reading pause via ethtool
* Also disable for speed, as it doesn't make sense (although the driver doesn't error.)
|
|
|
|
|
|
|
|
__init__ should be added to a derived class only if it does work in the ctor.
|
|
|