Page MenuHomeVyOS Platform

Revise vyos xml lib for bug fixes and extensions
Closed, ResolvedPublicENHANCEMENT


The vyos/xml python lib provides operations to read a cache of the XML interface-definitions in order to read node information defined therein: for example in collection information for the configuration dict, it is necessary to know if the node is tag/leaf/multi-valued and if it has defined default values. The current implementation is impressive, but suffers from several outstanding issues that prevent easy extensions, and necessitate workarounds.

A simple revision allows:

  • distinguishing between tag nodes and tag node values
  • correct defaults under tag node values
  • automatic merging of default values with the configuration dictionary
  • simplification of various other manipulations of the config dict (key-mangling)

This revision make use of the vyos1x-config reference_tree (T5194) to collect the xml cache, as a convenience: one could build the cache explicitly, as in the original implementation, however this method supports other planned development.

Migration away from the original implementation will be detailed in a sub-task, and will involve dropping various workarounds in favor of get_config_dict(..., with_defaults=True) and other simplifications.


Difficulty level
Hard (possibly days)
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Internal change (not visible to end users)

Related Objects

Event Timeline

jestabro changed the task status from Open to In progress.
jestabro triaged this task as Normal priority.
jestabro created this object in space S1 VyOS Public.

This will remain in draft until corresponding PR fro vyos1x-config is merged.

jestabro moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.