Open ckujau opened 4 years ago
In the meanwhile, you could probably just use any generic JSON merging tool against the saveconfig JSON files, merging the newer one on top of the older one.
One such example is this Python library. The indomitable jq
utility can also do this.
Once you have a merged config, you can just load it with a targetcli restoreconfig
cmd (or a targetctl restore
, etc.).
I'm looking for a way to merge two (more more) configuration files into one, preferably into a live configuration. Example use case: a
fileio
backstore has already been setup and is being used right now. A previous configuration file (.json
) for ablock
backstore is available and I want to be able to add that configuration to the running one.While searching for a feature like this, I've come across a patch for SLES12 against Datera/targetcli which appears to do just that:
Maybe something like this can be integrated into
targetcli-fb
? Looking to past and present issues, I can't help but think that #155 may be related here: