infix
infix copied to clipboard
Refactor sysrepo-load-modules.sh and extract modules.state
A great improvement in Infix of late, was when the bootstrapping of YANG modules was moved from runtime (on the device) to build time. As a spin-off we gained early detection of model issues -- not having to face a surprise when eventually starting up a device, and quicker device startup time.
After a few months now with this improvement in place we see other areas of improvement:
- Updating a model and reloading it into pre-runtime target datastores is fragile
- multiple model updates, without upping the file date, does not take
- sometimes model dependencies prevent reloading, leading to a distclean rebuild
- With an increase in static factory-confing.cfg in the tree, we need a linter at build time
Hence, a retake is necessary for increased efficiency, reliability, and add more features.
- We need to refactor the
sysrepo-load-modules.shscript, basically rewrite it without the Netopeer2 legacy - When a developer does
make confd-rebuildall modules should be reloaded, hence confd needs to "own" all modules, not spread out in sysrepo, netopeer2/libnetconf2, and rousette - With that in place, the script could do a:
sysrepocfg -X -f json -d operational -x /modules-state > modules-state.json