Ladislav Lhotka <lho...@nic.cz> wrote: > > > On 21 Oct 2015, at 09:17, Martin Bjorklund <m...@tail-f.com> wrote: > > > > Ladislav Lhotka <lho...@nic.cz> wrote: > >> Martin Bjorklund <m...@tail-f.com> writes: > >> > >>> Andy Bierman <a...@yumaworks.com> wrote: > >>>> Hi, > >>>> > >>>> I updated the YANG guidelines draft. > >>> > >>> I have a couple of comments. > >>> > >>> -------------------------- > >>> > >>> Section 5.14 says: > >>> > >>> The "choice" statement is allowed to be directly present within a > >>> "case" statement in YANG 1.1. > >>> > >>> It is allowed in YANG 1 as well. > >>> > >>> This needs to be considered > >>> carefully. Consider simply including the nested "choice" as > >>> additional "case" statements within the parent "choice" statement. > >>> > >>> Ok, but I don't think people use nested choice by accident. I have > >>> seen it used a handful of times, and there was always a good reason > >>> for doing it. If you think some warning text like this is needed, I > >> > >> But isn't it that in these legitimate cases the inner choice is always > >> accompanied by other nodes within the same case? The solution to Y29 > >> enables choice as a short-hand case, and this can always be > >> flattened. Do I miss something? > > > > No you're right. It should also be noted that an implementation can > > choose to flatten such nested choices. > > So maybe this was the reason for not allowing choice as a short-hand > case. I wonder, is Y29-01 a good idea after all? We are encouraging > people to do convoluted things that have a simpler alternative.
IMO Y29 is about having consistent rules in the language. Allowing short hand cases for just a subset of the nodes seems like a CLR. /martin _______________________________________________ netmod mailing list netmod@ietf.org https://www.ietf.org/mailman/listinfo/netmod