summaryrefslogtreecommitdiff
path: root/src/session.ml
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2025-04-06 18:26:13 -0500
committerJohn Estabrook <jestabro@vyos.io>2025-04-11 13:32:31 -0500
commit9e8feea52140222c689af1439eb7be63a9e121da (patch)
treeaf6359113c97c8479d6a3b7b9d8f4fec58747fa5 /src/session.ml
parentad2d932768734b492a54c728b459437056460668 (diff)
downloadvyconf-9e8feea52140222c689af1439eb7be63a9e121da.tar.gz
vyconf-9e8feea52140222c689af1439eb7be63a9e121da.zip
T7321: add discard operation
Diffstat (limited to 'src/session.ml')
-rw-r--r--src/session.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/session.ml b/src/session.ml
index 5f0d5a3..953df25 100644
--- a/src/session.ml
+++ b/src/session.ml
@@ -107,6 +107,9 @@ 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 discard w s =
+ {s with proposed_config=w.running_config}
+
let load w s file =
let ct = Vyos1x.Config_file.load_config file in
match ct with