tom petch <[email protected]> wrote:
> RFC8349 specifies an action with no input and says that modules that
> use this MUST augment the input with a leaf and that the leaf must
> be named destination-address.
>
> Is there any way that YANG can enforce either constraint?
This may look correct:
action activate-route {
input {
must '*[local-name(.) = "destination-address"]';
}
...
}
.... but unfortunatly we have a CLR in the definition of "input":
input-stmt = input-keyword optsep
"{" stmtsep
;; these stmts can appear in any order
*must-stmt
*(typedef-stmt / grouping-stmt)
HERE---------------> 1*data-def-stmt
"}" stmtsep
We require "input" to have at least one data-def-stmt, which doens't
make any sense, since we allow an action/rpc to not define "input" at
all.
/martin
>
> Tom Petch
>
>
> _______________________________________________
> netmod mailing list
> [email protected]
> https://www.ietf.org/mailman/listinfo/netmod
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod