Thanks for confirming,

William

-----Original Message-----
From: Martin Bjorklund [mailto:m...@tail-f.com] 
Sent: 27 October 2016 12:09
To: William Ivory <wiv...@brocade.com>
Cc: netmod@ietf.org
Subject: Re: [netmod] Does YANG allow forward references to groupings?

William Ivory <wiv...@brocade.com> wrote:
> Hi,
> 
> I'd appreciate clarification on whether a YANG grouping defined and 
> used in the same file must have the grouping definition first, before 
> the 'uses' statement.
> 
> On the one hand, RFC 6020 section 7.11 states: 'Once a grouping is 
> defined, it can be referenced in a "uses" statement', suggesting a C /
> C++ -style which doesn't allow forward references.
> (https://urldefense.proofpoint.com/v2/url?u=https-3A__tools.ietf.org_h
> tml_rfc6020-23section-2D7.11&d=DQICAg&c=IL_XqQWOjubgfqINi2jTzg&r=GByLe
> g9jZvOv_AlgBo9uvdDrxizlOR7l_SnTXowyJU8&m=WaccLYiQTR3H0OaccbcvkoVdly-9B
> GDfTNinmMS_xB0&s=HWT6JMdt0mDXM1-aPiwzhZOp2qLAsYo2w4h9G2lnIP8&e= )
> 
> On the other hand, section 6.2 states 'Forward references are allowed 
> in YANG.' 
> (https://urldefense.proofpoint.com/v2/url?u=https-3A__tools.ietf.org_html_rfc6020-23section-2D6.2&d=DQICAg&c=IL_XqQWOjubgfqINi2jTzg&r=GByLeg9jZvOv_AlgBo9uvdDrxizlOR7l_SnTXowyJU8&m=WaccLYiQTR3H0OaccbcvkoVdly-9BGDfTNinmMS_xB0&s=AMlXnMqEUOMZ6Lb0HQ-Y97cHo7BR0n7xK7cewn51wq4&e=
>  ).
> 
> I am assuming that the second, more explicit, statement trumps the 
> first, but would appreciate confirmation.

Correct.  YANG allows forward references to groupings.


/martin

_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to