Commit f95f268c authored by Ladislav Lhotka's avatar Ladislav Lhotka
Browse files

Remove must with preceding-sibling:: axis

parent 59dda4d5
Pipeline #55251 passed with stages
in 1 minute and 49 seconds
...@@ -25,7 +25,12 @@ module cznic-resolver-knot { ...@@ -25,7 +25,12 @@ module cznic-resolver-knot {
"This YANG module augments common resolver data with parts "This YANG module augments common resolver data with parts
specific to Knot Resolver."; specific to Knot Resolver.";
revision 2018-10-26 { revision 2019-11-07 {
description
"Remove 'must' condition with preceding-sibling:: axis.";
}
revision 2018-07-27 {
description description
"Initial revision."; "Initial revision.";
} }
...@@ -54,15 +59,12 @@ module cznic-resolver-knot { ...@@ -54,15 +59,12 @@ module cznic-resolver-knot {
uses drc:static-hint; uses drc:static-hint;
leaf canonical { leaf canonical {
type boolean; type boolean;
must ". = 'false' or "
+ "not(../preceding-sibling::hint[canonical = 'true' and "
+ "values = current()/../values])" {
error-message
"Duplicate canonical name for the same IP address.";
}
default "false"; default "false";
description description
"Only one key can be designated as the canonical name for "If this leaf is true, the key of the entry represents a
canonical name for all IP addresses in 'values'.
Only one key can be designated as the canonical name for
any given IP address."; any given IP address.";
} }
} }
......
...@@ -31,6 +31,11 @@ ...@@ -31,6 +31,11 @@
</text> </text>
</description> </description>
<revision date="2019-11-07">
<description>
<text>Remove 'must' condition with preceding-sibling:: axis.</text>
</description>
</revision>
<revision date="2018-07-27"> <revision date="2018-07-27">
<description> <description>
<text>Initial revision.</text> <text>Initial revision.</text>
...@@ -49,14 +54,13 @@ ...@@ -49,14 +54,13 @@
<leaf name="canonical"> <leaf name="canonical">
<type name="boolean"/> <type name="boolean"/>
<default value="false"/> <default value="false"/>
<must condition=". = 'false' or not(../preceding-sibling::hint[canonical = 'true' and values = current()/../values])">
<error-message>
<value>Duplicate canonical name for the same IP address.</value>
</error-message>
</must>
<description> <description>
<text>Only one key can be designated as the canonical name <text>
for any given IP address.</text> <h:p>If this leaf is true, the key of the entry represents
a canonical name for all IP addresses in 'values'.</h:p>
<h:p>Only one key can be designated as the canonical name
for any given IP address.</h:p>
</text>
</description> </description>
</leaf> </leaf>
<description> <description>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment