summaryrefslogtreecommitdiff
path: root/src/commit.mli
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2025-03-16 22:31:02 -0500
committerJohn Estabrook <jestabro@vyos.io>2025-03-16 23:13:39 -0500
commitd366f8e302ddadf9ad6ee74ca5430dcc52a7c67b (patch)
treeca012c18863bd663afbd05c51da6abea46973bf2 /src/commit.mli
parenta4cbf694160b74a70735db65adb712d40b417079 (diff)
downloadvyconf-d366f8e302ddadf9ad6ee74ca5430dcc52a7c67b.tar.gz
vyconf-d366f8e302ddadf9ad6ee74ca5430dcc52a7c67b.zip
T7121: keep track of source of subtree from delete or add trees
For partial commits with a config error on a subtree, one needs to know the origin of the failed subtree, whether from deletion or addition, in order to contruct the partial successful result.
Diffstat (limited to 'src/commit.mli')
-rw-r--r--src/commit.mli7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/commit.mli b/src/commit.mli
index e765f48..da97389 100644
--- a/src/commit.mli
+++ b/src/commit.mli
@@ -1,3 +1,5 @@
+type tree_source = DELETE | ADD
+
type status = {
success : bool;
out : string;
@@ -9,8 +11,9 @@ type node_data = {
tag_value: string option;
arg_value: string option;
path: string list;
+ source: tree_source;
reply: status option;
-} [@@deriving yojson]
+} [@@deriving to_yojson]
type commit_data = {
session_id: string;
@@ -21,7 +24,7 @@ type commit_data = {
background: bool;
init: status option;
node_list: node_data list;
-} [@@deriving yojson]
+} [@@deriving to_yojson]
val default_node_data : node_data