diff options
author | Christian Breunig <christian@breunig.cc> | 2023-03-10 20:41:18 +0100 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2023-04-01 15:45:08 +0200 |
commit | 9ea856640af398309b79cd9f1ebe8c4f025e2c62 (patch) | |
tree | baa1175a2079f5c1177898113f2a40f62498310f /schema | |
parent | e890a70d134fc63507ec396f9b7d4290df1cc0cb (diff) | |
download | vyos-1x-9ea856640af398309b79cd9f1ebe8c4f025e2c62.tar.gz vyos-1x-9ea856640af398309b79cd9f1ebe8c4f025e2c62.zip |
schema: T5079: extension to support defaultValues on tagNodes
(cherry picked from commit b4af532dd531c23bc1ad84cca290916be55357bf)
Diffstat (limited to 'schema')
-rw-r--r-- | schema/interface_definition.rnc | 2 | ||||
-rw-r--r-- | schema/interface_definition.rng | 15 |
2 files changed, 10 insertions, 7 deletions
diff --git a/schema/interface_definition.rnc b/schema/interface_definition.rnc index 192a70024..dd9c6abcf 100644 --- a/schema/interface_definition.rnc +++ b/schema/interface_definition.rnc @@ -43,7 +43,7 @@ node = element node tagNode = element tagNode { (ownerAttr? & nodeNameAttr), - (properties? & children ) + (defaultValue? & properties? & children ) } # Leaf nodes are terminal configuration nodes that can't have children, diff --git a/schema/interface_definition.rng b/schema/interface_definition.rng index 1ed18f456..282664ce8 100644 --- a/schema/interface_definition.rng +++ b/schema/interface_definition.rng @@ -2,19 +2,19 @@ <grammar xmlns="http://relaxng.org/ns/structure/1.0"> <!-- interface_definition.rnc: VyConf reference tree XML grammar - + 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 License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. - + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 @@ -72,6 +72,9 @@ </interleave> <interleave> <optional> + <ref name="defaultValue"/> + </optional> + <optional> <ref name="properties"/> </optional> <ref name="children"/> @@ -127,7 +130,7 @@ Nodes may have properties For simplicity, any property is allowed in any node, but whether they are used or not is implementation-defined - + Leaf nodes may differ in number of values that can be associated with them. By default, a leaf node can have only one value. @@ -135,7 +138,7 @@ "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. --> |