summaryrefslogtreecommitdiff
path: root/src/commit.mli
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2025-03-18 10:09:48 -0500
committerGitHub <noreply@github.com>2025-03-18 10:09:48 -0500
commit33cc7567d909c776d43ea6698267125ea1ec2f66 (patch)
tree5ffb797cf40f6a5ccbc16560d8b9d17ebab20e3b /src/commit.mli
parent41cbac4d6467c8bd62eeb247d2e28efa359e4a1c (diff)
parent57f788f4dc1468807a2d78f7effbbaddcae6f36c (diff)
downloadvyconf-33cc7567d909c776d43ea6698267125ea1ec2f66.tar.gz
vyconf-33cc7567d909c776d43ea6698267125ea1ec2f66.zip
Merge pull request #15 from jestabro/commitdHEADmaster
T7121: Set up communication vyconfd to vyos-commitd
Diffstat (limited to 'src/commit.mli')
-rw-r--r--src/commit.mli35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/commit.mli b/src/commit.mli
index db91195..da97389 100644
--- a/src/commit.mli
+++ b/src/commit.mli
@@ -1,2 +1,37 @@
+type tree_source = DELETE | ADD
+
+type status = {
+ success : bool;
+ out : string;
+}
+
+type node_data = {
+ script_name: string;
+ priority: int;
+ tag_value: string option;
+ arg_value: string option;
+ path: string list;
+ source: tree_source;
+ reply: status option;
+} [@@deriving to_yojson]
+
+type commit_data = {
+ session_id: string;
+ named_active : string option;
+ named_proposed : string option;
+ dry_run: bool;
+ atomic: bool;
+ background: bool;
+ init: status option;
+ node_list: node_data list;
+} [@@deriving to_yojson]
+
+val default_node_data : node_data
+
+val default_commit_data : commit_data
+
+val calculate_priority_lists : Vyos1x.Reference_tree.t -> Vyos1x.Config_tree.t -> Vyos1x.Config_tree.t -> node_data list * node_data list
+
+val commit_store : commit_data -> unit
val show_commit_data : Vyos1x.Config_tree.t -> Vyos1x.Config_tree.t -> string