Page MenuHomeVyOS Platform

Generalised Interface configuration
Closed, ResolvedPublicFEATURE REQUEST

Description Interface has a number of subclasses which are using configuration dictionaries. This should be generalised.

The work is about changing the interface code to be data driven, making the code as generic and reusable as possible.


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
Internal change (not visible to end users)

Event Timeline

This work overtakes T2046, as it implements the same _create/_delete interface. If merged it would replace it.

This work raised an issue with the current pattern of using Interface(..).remove() which is used in VLANIf as it requires Interface to know that EthernetIf can not be deleted (an implementation detail which should remain in EthernetIf).

So some further work should be done to fix that (it is a bit orthogonal) but come part of the same cleanup work.

Also, all the interface attribute do share most of the code but this is not reflected by the structure. The code could be simplified by having a generic "InterfaceOption" and mutate the interface class (for example with a decorator) or using inheritance. I am still thinking of the best way to do this.

syncer changed the task status from Open to In progress.Feb 29 2020, 2:09 AM
syncer triaged this task as Normal priority.
thomas-mangin claimed this task.
erkin set Issue type to Internal change (not visible to end users).Aug 31 2021, 5:34 PM