vyos-1x
vyos-1x copied to clipboard
save-config: T4292: rewrite vyatta-save-config.pl to Python
Change Summary
This is a draft PR, pending the merge of https://github.com/vyos/vyatta-cfg/pull/50 without which the original problem of allowing whitespace in tag node value names will be exacerbated by using config_tree for save-config. Also, there will need to be the supporting PR's for vyatta-cfg and vyatta-config-mgmt to use the rewrite vyos-save-config; they are listed below, and will need to be merged at the same time.
https://github.com/vyos/vyatta-cfg/pull/51 https://github.com/vyos/vyatta-config-mgmt/pull/12
This PR replaces https://github.com/vyos/vyos-1x/pull/1328, which will be closed. The reasons for dropping the updated load-config in the sequence of commits are summarized in: https://phabricator.vyos.net/T4295 Namely, using the external functions my_set/my_delete in place of the internal cstore setCfgPath/deleteCfgPath incured a notable performance hit, that will be addressed by another method; note that any approach does not pertain to loading the config at boot.
Consequently, this PR includes only the refactoring of component string read/write, and the rewrite of vyatta-save-config.pl.
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Code style update (formatting, renaming)
- [X] Refactoring (no functional changes)
- [X] Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
- [ ] Other (please describe):
Related Task(s)
- https://phabricator.vyos.net/Txxxx
Component(s) name
Proposed changes
How to test
Checklist:
- [X] I have read the CONTRIBUTING document
- [X] I have linked this PR to one or more Phabricator Task(s)
- [X] I have run the components SMOKETESTS if applicable
- [X] My commit headlines contain a valid Task id
- [ ] My change requires a change to the documentation
- [ ] I have updated the documentation accordingly