summaryrefslogtreecommitdiff
path: root/data/schemata/interface_definition.rnc
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2017-09-12 21:08:25 +0700
committerDaniil Baturin <daniil@baturin.org>2017-09-12 21:08:25 +0700
commitbc2c1a032a4aad1d5c3f5047d51f86bf8370b163 (patch)
tree91b809e6a1f5e377054e0b543159d122f0b645f6 /data/schemata/interface_definition.rnc
parentd498690d867f84c6c48f6e93cbd0a0c0c2909e4f (diff)
downloadvyconf-bc2c1a032a4aad1d5c3f5047d51f86bf8370b163.tar.gz
vyconf-bc2c1a032a4aad1d5c3f5047d51f86bf8370b163.zip
Add support for completionHelp tag to the schema.
Diffstat (limited to 'data/schemata/interface_definition.rnc')
-rw-r--r--data/schemata/interface_definition.rnc20
1 files changed, 19 insertions, 1 deletions
diff --git a/data/schemata/interface_definition.rnc b/data/schemata/interface_definition.rnc
index 3b3fa1e..48aae57 100644
--- a/data/schemata/interface_definition.rnc
+++ b/data/schemata/interface_definition.rnc
@@ -1,6 +1,6 @@
# interface_definition.rnc: VyConf reference tree XML grammar
#
-# Copyright (C) 2014 VyOS Development Group <maintainers@vyos.net>
+# Copyright (C) 2014. 2017 VyOS maintainers and contributors <maintainers@vyos.net>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -75,18 +75,23 @@ children = element children
# "valueless" means it can have no values at all.
# "hidden" means node visibility can be toggled, eg 'dangerous' commands,
# "secret" allows a node to hide its value from unprivileged users.
+#
+# "priority" is used to influence node processing order for nodes
+# with exact same dependencies and in compatibility modes.
properties = element properties
{
help? &
constraint? &
valueHelp* &
(element constraintErrorMessage { text })? &
+ completionHelp* &
# These are meaningful only for leaf nodes
(element valueless { empty })? &
(element multi { empty })? &
(element hidden { empty })? &
(element secret { empty })? &
+ (element priority { text })? &
# These are meaningful only for tag nodes
(element keepChildOrder { empty })?
@@ -134,3 +139,16 @@ valueHelp = element valueHelp
element format { text } &
element description { text }
}
+
+# completionHelp tags contain information about allowed values of a node that is used for generating
+# tab completion in the CLI frontend and drop-down lists in GUI frontends
+# It is only meaninful for leaf nodes
+# Allowed values can be given as a fixed list of values (e.g. <list>foo bar baz</list>),
+# as a configuration path (e.g. <path>interfaces ethernet</path>),
+# or as a path to a script file that generates the list (e.g. <script>/usr/lib/foo/list-things</script>
+completionHelp = element completionHelp
+{
+ (element list { text })* &
+ (element path { text })* &
+ (element script { text })*
+}