Page MenuHomeVyOS Platform

Simplify get_config_dict and add argument with_defaults
Closed, ResolvedPublicENHANCEMENT

Description

Using T5218, one can simplify some of the details of the fundamental operation get_config_dict: (1) simplify key_mangling (2) add argument with_defaults to allow automatically merging default values of the config dictionary.

Both simplifications proceed from the correct distinction of tag nodes from tag node values. Previously, due to the bug T2665, workarounds were required in each case.

Details

Difficulty level
Normal (likely a few hours)
Version
vyos-1.4
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)

Event Timeline

jestabro changed the task status from Open to In progress.May 17 2023, 6:29 PM
jestabro triaged this task as Normal priority.
jestabro created this task.
jestabro created this object in space S1 VyOS Public.

Draft PR re-opened following fix of regression with option 'recursive'; simplified logic and added optional args to get_config_defaults to mirror get_config_dict. The latter allows easy manipulation of defaults in cases where the automatic merge is not sufficient.