diff options
| author | John Estabrook <jestabro@vyos.io> | 2025-04-16 11:34:43 -0500 |
|---|---|---|
| committer | John Estabrook <jestabro@vyos.io> | 2025-05-12 11:26:41 -0500 |
| commit | c508c8c66c76488337745cf151d9570c42e38a3b (patch) | |
| tree | 9ac748a9f5c416eaa6a73abcf6fbfa216d30ab94 /src | |
| parent | 3c4d8803fc84da305aaa72cf97ca96fb19d186c9 (diff) | |
| download | vyconf-c508c8c66c76488337745cf151d9570c42e38a3b.tar.gz vyconf-c508c8c66c76488337745cf151d9570c42e38a3b.zip | |
T7363: normalize function naming for auto-generation
For auto-generation of Python classes, it is simpler to maintain
syntactical consistency; as these operations will be wrapped in any
client definitions, verbosity is forgivable.
Diffstat (limited to 'src')
| -rw-r--r-- | src/vyconf_pbt.ml | 16 | ||||
| -rw-r--r-- | src/vyconf_pbt.mli | 4 | ||||
| -rw-r--r-- | src/vyconfd.ml | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/vyconf_pbt.ml b/src/vyconf_pbt.ml index 5518e27..2f528a1 100644 --- a/src/vyconf_pbt.ml +++ b/src/vyconf_pbt.ml @@ -144,8 +144,8 @@ type request = | List_children of request_list_children | Run_op_mode of request_run_op_mode | Confirm - | Configure of request_enter_configuration_mode - | Exit_configure + | Enter_configuration_mode of request_enter_configuration_mode + | Exit_configuration_mode | Validate of request_validate | Teardown of request_teardown | Reload_reftree of request_reload_reftree @@ -841,8 +841,8 @@ let rec pp_request fmt (v:request) = | List_children x -> Format.fprintf fmt "@[<hv2>List_children(@,%a)@]" pp_request_list_children x | Run_op_mode x -> Format.fprintf fmt "@[<hv2>Run_op_mode(@,%a)@]" pp_request_run_op_mode x | Confirm -> Format.fprintf fmt "Confirm" - | Configure x -> Format.fprintf fmt "@[<hv2>Configure(@,%a)@]" pp_request_enter_configuration_mode x - | Exit_configure -> Format.fprintf fmt "Exit_configure" + | Enter_configuration_mode x -> Format.fprintf fmt "@[<hv2>Enter_configuration_mode(@,%a)@]" pp_request_enter_configuration_mode x + | Exit_configuration_mode -> Format.fprintf fmt "Exit_configuration_mode" | Validate x -> Format.fprintf fmt "@[<hv2>Validate(@,%a)@]" pp_request_validate x | Teardown x -> Format.fprintf fmt "@[<hv2>Teardown(@,%a)@]" pp_request_teardown x | Reload_reftree x -> Format.fprintf fmt "@[<hv2>Reload_reftree(@,%a)@]" pp_request_reload_reftree x @@ -1210,10 +1210,10 @@ let rec encode_pb_request (v:request) encoder = | Confirm -> Pbrt.Encoder.key 18 Pbrt.Bytes encoder; Pbrt.Encoder.empty_nested encoder - | Configure x -> + | Enter_configuration_mode x -> Pbrt.Encoder.nested encode_pb_request_enter_configuration_mode x encoder; Pbrt.Encoder.key 19 Pbrt.Bytes encoder; - | Exit_configure -> + | Exit_configuration_mode -> Pbrt.Encoder.key 20 Pbrt.Bytes encoder; Pbrt.Encoder.empty_nested encoder | Validate x -> @@ -1906,10 +1906,10 @@ let rec decode_pb_request d = Pbrt.Decoder.empty_nested d ; (Confirm : request) end - | Some (19, _) -> (Configure (decode_pb_request_enter_configuration_mode (Pbrt.Decoder.nested d)) : request) + | Some (19, _) -> (Enter_configuration_mode (decode_pb_request_enter_configuration_mode (Pbrt.Decoder.nested d)) : request) | Some (20, _) -> begin Pbrt.Decoder.empty_nested d ; - (Exit_configure : request) + (Exit_configuration_mode : request) end | Some (21, _) -> (Validate (decode_pb_request_validate (Pbrt.Decoder.nested d)) : request) | Some (22, _) -> (Teardown (decode_pb_request_teardown (Pbrt.Decoder.nested d)) : request) diff --git a/src/vyconf_pbt.mli b/src/vyconf_pbt.mli index 5f768f8..5791bff 100644 --- a/src/vyconf_pbt.mli +++ b/src/vyconf_pbt.mli @@ -151,8 +151,8 @@ type request = | List_children of request_list_children | Run_op_mode of request_run_op_mode | Confirm - | Configure of request_enter_configuration_mode - | Exit_configure + | Enter_configuration_mode of request_enter_configuration_mode + | Exit_configuration_mode | Validate of request_validate | Teardown of request_teardown | Reload_reftree of request_reload_reftree diff --git a/src/vyconfd.ml b/src/vyconfd.ml index bc607a3..9eaee6b 100644 --- a/src/vyconfd.ml +++ b/src/vyconfd.ml @@ -263,8 +263,8 @@ let rec handle_connection world ic oc () = | _, Reload_reftree r -> reload_reftree world r | None, _ -> {response_tmpl with status=Fail; output=(Some "Operation requires session token")} | Some t, Teardown _ -> teardown t - | Some t, Configure r -> enter_conf_mode r t - | Some t, Exit_configure -> exit_conf_mode world t + | Some t, Enter_configuration_mode r -> enter_conf_mode r t + | Some t, Exit_configuration_mode -> exit_conf_mode world t | Some t, Exists r -> exists world t r | Some t, Get_value r -> get_value world t r | Some t, Get_values r -> get_values world t r |
