Page MenuHomeVyOS Platform

Rewrite vyatta-config-mgmt to Python/XML
Closed, ResolvedPublicFEATURE REQUEST


This task replaces the legacy package vyatta-config-mgmt with a Python module, conf_mode script, op_mode script, and XML interface-definitions and op-mode-definitions. The task is listed as 'feature request' as one motivation was the desire to have a 'commit-confirm' function available via API; this in turn motivated a rewrite which serves to help in the goal of dropping legacy Vyatta code.

The legacy package in question is (1) a collection of tools for managing and viewing the history of config files (2) annoyingly self-referential. To address the matter a Python module '' is added with a console-script entry point 'config-mgmt' to call various subcommands; post-commit hooks and conf-mode/op-mode support functions are defined within the module. Consequently, calling operations 'commit-confirm'; 'confirm'; 'rollback'; 'compare' is straightforward; conf-mode and op-mode scripts are simple.

Behavioral changes: the legacy behavior of 'commit-confirm' adds a log entry and archives config files even when the commit is 'canceled', in the sense that 'confirm' is not issued and the system reboots to the saved config. That is no longer the case: the log entry is cached and only added if 'confirm' is issued, in which case the config file is archived. Secondly, a warning is given at a prompt if 'commit-confirm' is issued with unsaved commits, so one can save commits first before proceeding. Finally, the Python library difflib's 'unified_diff' is used for diff output instead of the legacy vyatta-cfg hand-crafted diff formatting; I contend this is cleaner, and allows us to avoid further calls to cli-shell-api functions.


Difficulty level
Hard (possibly days)
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Behavior change
Issue type
Improvement (missing useful functionality)

Event Timeline

jestabro changed the task status from Open to Needs testing.Jan 19 2023, 3:18 AM
jestabro triaged this task as Normal priority.
jestabro created this task.
jestabro created this object in space S1 VyOS Public.
jestabro updated the task description. (Show Details)
jestabro moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.