diff options
author | John Estabrook <jestabro@vyos.io> | 2021-05-22 12:51:18 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2021-06-23 20:05:47 -0500 |
commit | 591b8bcadd8b6bbd46c61484193d2bf7e16bd1ae (patch) | |
tree | 2e9a5ce8daef4fe52eae490fe6d344cf629e2753 /schema/interface_definition.rng | |
parent | d48dddab0509e562209adfb115b0e691b8e47f54 (diff) | |
download | vyos-1x-591b8bcadd8b6bbd46c61484193d2bf7e16bd1ae.tar.gz vyos-1x-591b8bcadd8b6bbd46c61484193d2bf7e16bd1ae.zip |
T3574: add constraintGroup to schema
Diffstat (limited to 'schema/interface_definition.rng')
-rw-r--r-- | schema/interface_definition.rng | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/schema/interface_definition.rng b/schema/interface_definition.rng index 22e886006..3ff60cf18 100644 --- a/schema/interface_definition.rng +++ b/schema/interface_definition.rng @@ -161,6 +161,9 @@ <ref name="constraint"/> </optional> <zeroOrMore> + <ref name="constraintGroup"/> + </zeroOrMore> + <zeroOrMore> <ref name="valueHelp"/> </zeroOrMore> <optional> @@ -244,6 +247,24 @@ </oneOrMore> </element> </define> + <!-- + Tag and leaf nodes may have constraintGroups on their names and + values (respectively). + When multiple constraints are listed within a group, they work as + logical AND + --> + <define name="constraintGroup"> + <element name="constraintGroup"> + <oneOrMore> + <choice> + <element name="regex"> + <text/> + </element> + <ref name="validator"/> + </choice> + </oneOrMore> + </element> + </define> <!-- A constraint may also use an external validator rather than regex --> <define name="validator"> <element name="validator"> |