Age | Commit message (Collapse) | Author |
|
The config diff function produces both del(ete) and sub(tract) trees.
The delete tree contains the minimal path difference between compared
trees, for example, between the active and proposed configs; this is
the information needed to execute removal of a path. The subtract tree
contains the full paths in active that are not in proposed; this retains
necessary information in certain cases. In case all tag values of a tag
node are removed, the delete tree contains only the tag node itself,
however for proper script execution of a deleted tag node, one will need
the removed tag node values: restore this information from the subtract
tree.
|
|
|
|
|
|
|
|
|
|
Redesign and implement version without mutable refs.
|
|
|
|
|
|
|
|
This was a general use function that is uneeded in this simple case.
|
|
|
|
|
|
The practice of using "root" for the internal name of the root node
collides with actual nodes named "root", due to a utility function that
checks 'if root' by name. Use empty string as name of root node, as no
actual node will match.
|
|
|
|
|
|
|
|
In the intial implementation, the delete tree only kept the first node
of a path not present in the RHS of the comparison; this was done as a
convenience for generating 'trimmed' delete commands for the CLI.
However, this loses needed information, and breaks the symmetry of
results:
LHS, RHS -> del, inter, add
RHS, LHS -> add, inter, del
Keep full paths in delete tree and rename trees.del to trees.sub(-tract).
A separate function 'trim_tree' will be provided to produce a
CLI-appopriate delete tree and commands.
|
|
|
|
|