open-switch / opx-base-model

https://openswitch.net
6 stars 13 forks source link

Invalid yang in sflow.yang #37

Open kot-begemot-uk opened 6 years ago

kot-begemot-uk commented 6 years ago

The list entry contains both a choice which has an alternative called ifindex and a leaf which is called ifindex.

One of these has to go. Either the choice has to be reduced to a single (optional) leaf for name or the leaf for ifindex has to be removed so that the choice can provide either name or ifindex.

atanu-mandal commented 6 years ago

The YANG "status" keyword is mentioned as "deprecated" inside the leaf definition of ifindex. To write a fresh application on top of this the user should use the "choice" option . The leaf node is kept for backward compatibility so that the user/customer applications written for Release N still work for subsequent releases N+1 and N+2, where N is an OPX major release number. Hope that helps.

kot-begemot-uk commented 6 years ago

It fails validation in half of the validators out there. Starting with pyang.

While I understand the intention, the standard validator used by IETF for compliance to the RFC declares it invalid.