diff options
author | John Estabrook <jestabro@vyos.io> | 2022-02-08 21:05:07 -0600 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2022-02-08 21:05:07 -0600 |
commit | ba3b34c901b74aa4aee0764e4f3eb84731519139 (patch) | |
tree | 58151722d9c41e9ae526543de6b69311325e2e4e /src/config_diff.mli | |
parent | 0a5210b376203652046628c55c88e77cf6401780 (diff) | |
download | vyos1x-config-ba3b34c901b74aa4aee0764e4f3eb84731519139.tar.gz vyos1x-config-ba3b34c901b74aa4aee0764e4f3eb84731519139.zip |
configtree: T4235: implementation of config tree diff
Diffstat (limited to 'src/config_diff.mli')
-rw-r--r-- | src/config_diff.mli | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/config_diff.mli b/src/config_diff.mli new file mode 100644 index 0000000..623c6ef --- /dev/null +++ b/src/config_diff.mli @@ -0,0 +1,21 @@ +type change = Unchanged | Added | Deleted | Updated of string list + +type diff_func = ?with_children:bool -> string list -> change -> unit + +type diff_trees = { + left: Config_tree.t; + right: Config_tree.t; + add: Config_tree.t ref; + del: Config_tree.t ref; + inter: Config_tree.t ref; +} + +exception Incommensurable +exception Empty_comparison + +val make_diff_tree : Config_tree.t -> Config_tree.t -> diff_trees +val clone : ?with_children:bool -> ?set_values:string list -> Config_tree.t -> Config_tree.t -> string list -> Config_tree.t +val decorate_trees : diff_trees -> ?with_children:bool -> string list -> change -> unit +val compare : string list -> Config_tree.t -> Config_tree.t -> diff_trees +val diffs : string list -> Config_tree.t -> Config_tree.t -> Config_tree.t * Config_tree.t * Config_tree.t + |