Page MenuHomeVyOS Platform

Replace legacy loadFile with config_diff
In progress, NormalPublicENHANCEMENT

Description

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.

Details

Difficulty level
Hard (possibly days)
Version
vyos-1.4
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Feature (new functionality)

Event Timeline

jestabro changed the task status from Open to In progress.Jan 16 2024, 2:41 AM

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