We’re using the ‘J’ style CLI. Playing around with the config-mode “load” command and I’m not seeing the behavior I would expect and wondering if there are bugs here…
First off, would be really nice if the config option applied to J style (in fairness it doesn’t mention J style support and it CLEARLY is ignored…I guess the only way to get rid of merge in J style is to do a tag in my clispec, correct?).
Secondly, it seems that “override” and “replace” mode (at least for J style CLI) both do a “merge” and not actually nuke what was there previously. IE, my base-system config defines objects A1, A2, A3, A4. I make and save a config that modifies A1 and A2. Then I make and save a separate config that modifies A3 and A4. Now boot up with a clean (virgin) config. Load saved-config-1, it correctly modifies objects A1 and A2. Now load saved-config-2 and no matter which of “merge”, “override”, or “replace” is used, what I now have is a configuration with A1, A2, A3, and A4 modified. A1 and A2 were not returned to their virgin state (more over, in the saved-config-2, A1 and A2 exist in the virgin config state). The only way I have found (and it’s rather hackish) is to do a rollback to the initial virgin state between loading the first config and loading the second.
That brings up the next point, is there any way from inside the standard J-style CLI to roll back to a virgin state (i.e., empty cdb loaded with just the .xml files in the cdb directory)? I see in the manual that "confd_load -D -m -l cdb/.xml" looks like it will do it from me from linux (and I guess I could wrapper this in a config-mode command myself), just wondering if I’m missing something here…I can do a rollback to the first commit (boot time commit) assuming it hasn’t rolled out of the range of saved commits (unless I want to do infinite storage).