summaryrefslogtreecommitdiff
path: root/src/commit.ml
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2025-03-20 21:26:37 -0500
committerJohn Estabrook <jestabro@vyos.io>2025-03-31 00:50:30 -0500
commitbed066dbf1b6cf9d606c0f1f827cce30f4dcc430 (patch)
treec0bf75f5de2faeaacc3d9486b049700c4b5559ec /src/commit.ml
parent96058ef19d655a8854ccbb676ec43b16b4d1e0af (diff)
downloadvyconf-bed066dbf1b6cf9d606c0f1f827cce30f4dcc430.tar.gz
vyconf-bed066dbf1b6cf9d606c0f1f827cce30f4dcc430.zip
T7272: simplify library dependencies for implementation of commit op
Diffstat (limited to 'src/commit.ml')
-rw-r--r--src/commit.ml20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/commit.ml b/src/commit.ml
index a2b9f6e..a0d9d35 100644
--- a/src/commit.ml
+++ b/src/commit.ml
@@ -2,7 +2,6 @@ module VT = Vyos1x.Vytree
module CT = Vyos1x.Config_tree
module CD = Vyos1x.Config_diff
module RT = Vyos1x.Reference_tree
-module FP = FilePath
type tree_source = DELETE | ADD
@@ -175,22 +174,3 @@ let commit_store c_data =
| false -> acc ^ "\n" ^ r.out
in List.fold_left func "" c_data.node_list
in print_endline out
-
-let show_commit_data at wt =
- let vc =
- Startup.load_daemon_config Defaults.defaults.config_file in
- let rt_opt =
- Startup.read_reference_tree (FP.concat vc.reftree_dir vc.reference_tree)
- in
- match rt_opt with
- | Error msg -> msg
- | Ok rt ->
- let del_list, add_list =
- calculate_priority_lists rt at wt
- in
- let sprint_node_data acc s =
- acc ^ "\n" ^ (node_data_to_yojson s |> Yojson.Safe.to_string)
- in
- let del_out = List.fold_left sprint_node_data "" del_list in
- let add_out = List.fold_left sprint_node_data "" add_list in
- del_out ^ "\n" ^ add_out