diff options
| author | John Estabrook <jestabro@vyos.io> | 2025-09-10 19:13:21 -0500 |
|---|---|---|
| committer | John Estabrook <jestabro@vyos.io> | 2025-09-15 08:13:29 -0500 |
| commit | bca62a7bd1da4e78497fdce3882421609ce28c00 (patch) | |
| tree | 4a415189068819e7914ae1352a69abe08eb45c60 /src/vyconfd.ml | |
| parent | 6577d7ac1b10557b5087bc959dad3c21971a539b (diff) | |
| download | vyconf-bca62a7bd1da4e78497fdce3882421609ce28c00.tar.gz vyconf-bca62a7bd1da4e78497fdce3882421609ce28c00.zip | |
T7737: apply auxiliary set/delete operations to config post-commit
Diffstat (limited to 'src/vyconfd.ml')
| -rw-r--r-- | src/vyconfd.ml | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/vyconfd.ml b/src/vyconfd.ml index 9e8c57e..05cd693 100644 --- a/src/vyconfd.ml +++ b/src/vyconfd.ml @@ -295,21 +295,27 @@ let commit world token (req: request_commit) = let res, out = init_data.success, init_data.out in + let () = + (Lwt_log.debug @@ Printf.sprintf "aux_changeset: %s" (Session.sprint_changeset s.aux_changeset)) |> Lwt.ignore_result + in match res with | false -> Lwt.return {response_tmpl with status=Internal_error; error=(Some out)} | true -> - (* partial commit *) if not req_dry_run then - world.Session.running_config <- result_commit_data.config_result; + let post_running, post_proposed = + Session.post_process_commit world s (result_commit_data, proposed_config) + in + world.Session.running_config <- post_running; let session = { s with changeset = Session.get_changeset world world.Session.running_config - proposed_config; + post_proposed; aux_changeset = []; } - in Hashtbl.replace sessions token session; + in Hashtbl.replace sessions token session + else (); let success, msg_str = result_commit_data.result.success, result_commit_data.result.out |
