On Sat, Jan 28, 2017 at 2:54 AM, Ladislav Lhotka <lho...@nic.cz> wrote:
> > > On 27 Jan 2017, at 20:23, Andy Bierman <a...@yumaworks.com> wrote: > > > > Hi, > > > > The "pyang --ietf" validator checks the statement order used in > data-def-stmts. > > There is no guideline that says this is required. > > RFC 7950 says canonical order is RECOMMENDED. > > > > 1) data-def sub-statement order > > Proposal: add new last sentence to sec. 4.6, para 3: > > > > YANG data definition sub-statements SHOULD be specified in canonical > order. > > IMO, this adds nothing to what's already stated in 7950. According to RFC > 2119, SHOULD and RECOMMENDED mean the same. > > OK > > > > > > 2) enum/bit statement ordering > > > > Proposal: add new para 2 to sec 5.11.3: > > > > The 'enum' statements within an 'enumeration' data type SHOULD be > > specified in ascending order, based on the implied and/or explicit values > > of the 'value' sub-statement. The 'bit' statements within a 'bits' data > type > > SHOULD be specified in ascending order, based on the implied and/or > > explicit values of the 'position' sub-statement. > > I don't agree. For some enumerations, especially those with a large number > of enums, it is much more useful for the reader to have the enums ordered > differently, e.g. alphabetically or geographically. On the other hand, > numeric enum values often need to be assigned in the order how enums are > defined in subsequent revisions. > > We have been using ascending order in MIB modules and YANG modules all along. I think there are about 5000 modules in ascending order and one not in ascending order. The guideline is SHOULD anyway. YANG prohibits the value or position numbers from changing in a new revision, so preserving previous ordering is required. > Lada > Andy > > > > > > > > > Andy > > > > _______________________________________________ > > netmod mailing list > > netmod@ietf.org > > https://www.ietf.org/mailman/listinfo/netmod > > -- > Ladislav Lhotka, CZ.NIC Labs > PGP Key ID: 0xB8F92B08A9F76C67 > > > > > >
_______________________________________________ netmod mailing list netmod@ietf.org https://www.ietf.org/mailman/listinfo/netmod