> On 11 Dec 2015, at 10:29, GUBALLA, JENS (JENS) > <[email protected]> wrote: > > Hi, > > According to RFC6020 a leafref within a union is not allowed. This issue is > captured by Y30 of the yang1.1 issue list. > > My question: how can such a construct as show below be modeled conforming to > RFC6020? > > leaf the_reference {type uint8;} > leaf something { > type union { > type leafref { > path "../the_reference"; > } > type enumeration { > enum "none"; > enum "something-else"; > } > } > } > > Has anyone any ideas or can someone provide me a pointer if this has been > discussed already?
You can define the first union member simply as uint8, without being formally coupled with "the_reference". I'd suggest to use YANG 1.1 though where that CLR was removed. Lada > > Thanks, > Jens > _______________________________________________ > netmod mailing list > [email protected] > https://www.ietf.org/mailman/listinfo/netmod -- Ladislav Lhotka, CZ.NIC Labs PGP Key ID: E74E8C0C
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
