"Jan Lindblad \(jlindbla\)" <[email protected]> writes:
> Hi NETMOD,
>
> A few days ago, as I was looking for examples of when-expressions in standard
> modules, I stumbled over this in RFC 8944:
>
> augment "/nw:networks/nw:network" {
> when '/nw:networks/nw:network/nw:network-types/l2t:l2-topology' {
> description
> "Augmentation parameters apply only for networks
> with L2 topology.";
> }
> description
> "Configuration parameters for the L2 network
> as a whole.";
> uses l2-topology-attributes;
> }
>
> ... and a few other similar constructs in there.
>
> As you can see the when expression is unconstrained when it comes to which
> network it refers to, which changes the semantics from "Augmentation
> parameters apply only for networks with L2 topology" as the authors are
> wishing for to "Augmentation parameters apply to all networks as soon as
> there is at least one with L2 topology".
>
> Aside from RFC 8944, I also noticed very similar problems in RFC 9094, RFC
> 8542, RFC 8294, RFC 8513 and RFC 8782. The list may be incomplete.
Yes, I remember flagging this issue in at least one of my YD reviews. I think
this also led to the myth that YANG Doctors prefer relative paths to absolute.
:-)
>
> What do we do with the broken YANGs modules in these RFCs?
A bis is needed in each case, errata unfortunately won't work.
>
> Since this seems to be a rather frequently occurring issue, are there any
> mitigation steps we should take in NETMOD, apart from strengthening the YANG
> Doctor review process?
Hardly anything. It is IMO too late to part with XPath 1.0. On the one hand, it
is a complicated beast, unnecessarily for YANG purposes. On the other hand,
many YANG module authors don't bother to learn even the basics.
>
> What can we reasonably do to ensure all YANG Doctor reviews catch these
> valid, but unintended XPath expressions before publication?
Tools cannot help much with "false positive" results of XPath evaluation, we
just have to be careful and double-check especially absolute paths.
Lada
>
> Best Regards,
> /Jan Lindblad
>
> _______________________________________________
> netmod mailing list
> [email protected]
> https://www.ietf.org/mailman/listinfo/netmod
--
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod