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.
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.
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | FEATURE REQUEST | thomas-mangin | T2057 Generalised Interface configuration | ||
Resolved | FEATURE REQUEST | dmbaturin | T2101 Fix VXLAN config option parsing |
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.