summaryrefslogtreecommitdiff
path: root/src/reference_tree.mli
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2025-12-08 18:49:00 -0600
committerJohn Estabrook <jestabro@vyos.io>2025-12-17 21:13:45 -0600
commitebc3e8804c612d7b1cdd260adc5e9930505bcdd6 (patch)
tree6167cc746162709eddc27c09a856f5b42e002188 /src/reference_tree.mli
parent9e1a4ca21e034233d6fc6299bb181f4e1634820e (diff)
downloadvyos1x-config-ebc3e8804c612d7b1cdd260adc5e9930505bcdd6.tar.gz
vyos1x-config-ebc3e8804c612d7b1cdd260adc5e9930505bcdd6.zip
T8061: extend node_type to path_type for path characteristics
For an arbitrary path, determine if it has the characterists of a configuration path, and return the potential node type, solely in terms of the reference tree. No validation is taking place on values.
Diffstat (limited to 'src/reference_tree.mli')
-rw-r--r--src/reference_tree.mli11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/reference_tree.mli b/src/reference_tree.mli
index e45310e..dd8230d 100644
--- a/src/reference_tree.mli
+++ b/src/reference_tree.mli
@@ -1,7 +1,6 @@
-type node_type =
- | Leaf
- | Tag
- | Other
+type node_type = [ `Leaf | `Tag | `Other ]
+
+type path_type = [ node_type | `Tag_value | `Leaf_value | `Multi | `Invalid ]
type completion_help_type =
| List of string [@name "list"]
@@ -120,6 +119,10 @@ val set_leaf_data : t -> Config_tree.t -> string list -> Config_tree.t
val reference_path_exists : t -> string list -> bool
+val get_path_type : t -> string list -> path_type
+
+val get_path_type_str : ?legacy_format:bool -> t -> string list -> string
+
val allowed_edit_level : t -> string list -> (unit, string) result
val get_ceil_data : (ref_node_data -> string option) -> t -> string list -> string option