Page MenuHomeVyOS Platform

Generalised Interface configuration
Closed, ResolvedPublicFEATURE REQUEST

Description

ifconfig.py 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.

Details

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

Event Timeline

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

pasik added a subscriber: pasik.Feb 20 2020, 9:24 PM

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.

The patch is ready for inclusion.

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 closed this task as Resolved.Jun 26 2020, 1:32 PM
thomas-mangin claimed this task.