diff options
author | John Estabrook <jestabro@vyos.io> | 2024-10-23 18:50:46 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2024-10-27 21:47:33 -0500 |
commit | bd17726d30991619eca09bfe478659915bc12fe4 (patch) | |
tree | ea957c5f2b154e4661c88baf50074f17488a9c58 /src/vycli.ml | |
parent | 75441a50c50f65f580d6919ed6c4f282fd842e49 (diff) | |
download | vyconf-bd17726d30991619eca09bfe478659915bc12fe4.tar.gz vyconf-bd17726d30991619eca09bfe478659915bc12fe4.zip |
T6718: add independent validate field and methods
Diffstat (limited to 'src/vycli.ml')
-rw-r--r-- | src/vycli.ml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vycli.ml b/src/vycli.ml index 4310cbd..83c5eb1 100644 --- a/src/vycli.ml +++ b/src/vycli.ml @@ -10,6 +10,7 @@ type op_t = | OpGetValue | OpGetValues | OpListChildren + | OpValidate let token : string option ref = ref None let conf_format_opt = ref "curly" @@ -34,6 +35,7 @@ let args = [ ("--list-children", Arg.Unit (fun () -> op := Some OpListChildren), "List children of the node at the specified path"); ("--show-config", Arg.Unit (fun () -> op := Some OpShowConfig), "Show the configuration at the specified path"); ("--status", Arg.Unit (fun () -> op := Some OpStatus), "Send a status/keepalive message"); + ("--validate", Arg.Unit (fun () -> op := Some OpValidate), "Validate path"); ] let config_format_of_string s = @@ -74,6 +76,7 @@ let main socket op path out_format config_format = | OpGetValues -> get_values client path | OpListChildren -> list_children client path | OpShowConfig -> show_config client path + | OpValidate -> validate client path | _ -> Error "Unimplemented" |> Lwt.return end in match result with |