The possibility of replacing loadFile with config_diff was mentioned in the description in T4295. The generalization of 'diff functions' in the course of T5317 support the plan of defining batch set/delete operations of a cstore instance within a call to diff. One expects performance to be comparable, and the lack of useful error reporting in loadFile can be addressed.
Description
Details
- Version
- vyos-1.4
- Is it a breaking change?
- Perfectly compatible
- Issue type
- Feature (new functionality)
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
In progress | FEATURE REQUEST | None | T3355 Remove all remaining legacy Vyatta code | ||
Open | BUG | None | T4316 Update save-config/load-config | ||
Resolved | jestabro | T4235 Add config tree diff algorithm | |||
Not Applicable | FEATURE REQUEST | jestabro | T4295 Use config_tree instead of legacy loadFile in vyos-load-config.py | ||
Resolved | ENHANCEMENT | jestabro | T5316 configtree: use a single pass of the diff algorithm | ||
Resolved | ENHANCEMENT | jestabro | T5317 configtree: remove mutable references | ||
In progress | ENHANCEMENT | jestabro | T5528 Replace legacy loadFile with config_diff | ||
Resolved | ENHANCEMENT | jestabro | T5815 Add load_config module | ||
Resolved | ENHANCEMENT | jestabro | T5400 Move libvyosconfig build out of the Docker image |
Event Timeline
The working implementation is linked below; performance is not yet comparable to the legacy loadFile, though there are obvious points of optimization to be made. The general framework will be submitted for PR to support other development, with load_config as an illustrative example, but not yet a replacement for loadFile.
https://github.com/jestabro/vyos1x-adapter
https://github.com/vyos/vyos1x-config/compare/master...jestabro:vy-adapter
https://github.com/vyos/vyos-1x/compare/current...jestabro:vy-adapter
https://github.com/vyos/vyatta-cfg/compare/current...jestabro:vy-adapter
https://github.com/vyos/libvyosconfig/compare/master...jestabro:vy-adapter
This will be readied for PR without adding the external package vyos1x-adapter; that version has already been completed and will be linked below.
Links for PR in preparation:
https://github.com/vyos/vyos1x-config/compare/current...jestabro:vy-adapter
https://github.com/vyos/vyatta-cfg/compare/current...jestabro:vy-adapter
https://github.com/vyos/vyos-1x/compare/current...jestabro:vy-adapter
https://github.com/vyos/libvyosconfig/compare/current...jestabro:vy-adapter
Note that the last will need to be updated with the vyos1x-config commit hash after it is merged, as pinning is now done during the libvyosconfig build.
The suggestion to replace the native C api with ctypes, in order to avoid a build dependency on libvyattta-cfg.so, still requires calling dlopen when building the derived libarary libvyosconfig; the above retains the original approach which provides other advantages.
This work has been generalized and simplified for use with the minimal vyconf daemon:
https://vyos.dev/T6717
This PR will be closed when following completion of T6717.