From ab010dbe993afc990fafa4525e1a94670ca7f5a4 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Sun, 30 Mar 2025 22:29:35 -0500 Subject: T7272: call both Lwt connections under a single Lwt.main Call both the vyconfd server and the vyos-commitd client under the top-level Lwt.main loop. --- src/session.ml | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'src/session.ml') diff --git a/src/session.ml b/src/session.ml index 9e78be3..567f999 100644 --- a/src/session.ml +++ b/src/session.ml @@ -1,8 +1,6 @@ module CT = Vyos1x.Config_tree module VT = Vyos1x.Vytree module RT = Vyos1x.Reference_tree -module CC = Commitd_client.Commit -module VC = Commitd_client.Vycall_client module D = Directories exception Session_error of string @@ -90,21 +88,6 @@ let delete w s path = let config = apply_cfg_op op s.proposed_config in {s with proposed_config=config; changeset=(op :: s.changeset)} -let commit w s t = - let at = w.running_config in - let wt = s.proposed_config in - let rt = w.reference_tree in - let commit_data = CC.make_commit_data rt at wt t in - let received_commit_data = VC.do_commit commit_data in - let result_commit_data = - try - CC.commit_update received_commit_data - with CC.Commit_error e -> - raise (Session_error (Printf.sprintf "Commit internal error: %s" e)) - in - w.running_config <- result_commit_data.config_result; - result_commit_data.result.success, result_commit_data.result.out - let get_value w s path = if not (VT.exists s.proposed_config path) then raise (Session_error ("Config path does not exist")) -- cgit v1.2.3