diff options
author | Daniil Baturin <daniil@vyos.io> | 2025-06-26 15:29:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-26 15:29:43 +0100 |
commit | 062f7f4e7cd7d71cba56d168f9f99344e9044b59 (patch) | |
tree | f17a96f9726cdffcb2ef2fab10309f4b313ed8cc /schema/op-mode-definition.rng | |
parent | 5c2f70ffd82047740a91be949af5098a6ee39c2c (diff) | |
parent | edc64e7fb63757a3779df12945ecefca9c462952 (diff) | |
download | vyos-1x-062f7f4e7cd7d71cba56d168f9f99344e9044b59.tar.gz vyos-1x-062f7f4e7cd7d71cba56d168f9f99344e9044b59.zip |
Merge pull request #4565 from dmbaturin/T7560-op-virtual-tag-nodes
op-mode: T7560: add support for virtual tag nodes
Diffstat (limited to 'schema/op-mode-definition.rng')
-rw-r--r-- | schema/op-mode-definition.rng | 54 |
1 files changed, 46 insertions, 8 deletions
diff --git a/schema/op-mode-definition.rng b/schema/op-mode-definition.rng index bfd5cb50a..d7a56c6b2 100644 --- a/schema/op-mode-definition.rng +++ b/schema/op-mode-definition.rng @@ -102,6 +102,27 @@ </element> </define> <!-- + Virtual tag nodes provide a way to add a variable argument + to a command that also needs fixed arguments, + like "show ip route" that can take "show ip route bgp" + or a network and arguments after it, like "show ip route 10.0.0.0/8 longer-prefixes" + --> + <define name="virtualTagNode"> + <element name="virtualTagNode"> + <interleave> + <optional> + <ref name="properties"/> + </optional> + <optional> + <ref name="children"/> + </optional> + <optional> + <ref name="command"/> + </optional> + </interleave> + </element> + </define> + <!-- Leaf nodes are terminal configuration nodes that can't have children, but can have values. --> @@ -114,16 +135,33 @@ </interleave> </element> </define> - <!-- Normal and tag nodes may have children --> + <!-- + Normal and tag nodes may have children: nodes, leaf nodes, or tag nodes. + There can only be one virtual tag node child, though. + --> <define name="children"> <element name="children"> - <oneOrMore> - <choice> - <ref name="node"/> - <ref name="tagNode"/> - <ref name="leafNode"/> - </choice> - </oneOrMore> + <choice> + <interleave> + <optional> + <ref name="virtualTagNode"/> + </optional> + <zeroOrMore> + <choice> + <ref name="node"/> + <ref name="tagNode"/> + <ref name="leafNode"/> + </choice> + </zeroOrMore> + </interleave> + <oneOrMore> + <choice> + <ref name="node"/> + <ref name="tagNode"/> + <ref name="leafNode"/> + </choice> + </oneOrMore> + </choice> </element> </define> <!-- |