I agree. I am actually surprised to not see it in RFC 8407. This is a very useful "best practice" as a design pattern. (I think there are other useful patterns worth describing as well, such as concerning when to use groupings or choices or identities, with the last one in particular in my experience often being poorly understood despite RFC 8407 mentioning it but perhaps not clear enough.) --- Alex
-----Original Message----- From: netmod <[email protected]> On Behalf Of Italo Busi Sent: Tuesday, September 5, 2023 6:47 AM To: Carsten Bormann <[email protected]>; netmod <[email protected]> Subject: Re: [netmod] List name: singular or plural? I am wondering whether this convention cannot be documented in rfc8407bis My 2 cents Italo > -----Original Message----- > From: Carsten Bormann <[email protected]> > Sent: martedì 29 agosto 2023 21:27 > To: netmod <[email protected]> > Subject: [netmod] List name: singular or plural? > > Should list names be singular or plural? > > > Archived-At: > <https://mai/ > larchive.ietf.org%2Farch%2Fmsg%2Flast-&data=05%7C01%7Calex%40futurewei > .com%7C1661912f0d404557b1be08dbae1694a5%7C0fee8ff2a3b240189c753a1d5591 > fedc%7C1%7C0%7C638295184243302189%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w > LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C > &sdata=EUZXd1aYqLQTAev8pYSKIqn%2Baj6OlNKgEeXSIhQMZRY%3D&reserved=0 > call/Nh_O8sREv7mBri2_lbIaijorjNE> > As a convention, in IETF YANG modules, the node name of a list is in > the singular form. > Above the list there can be a container with a name in the plural form. > > This seems to be supported by the example in 4.26 in RFC 8407. > > > Archived-At: > <https://mai/ > larchive.ietf.org%2Farch%2Fmsg%2Flast-&data=05%7C01%7Calex%40futurewei > .com%7C1661912f0d404557b1be08dbae1694a5%7C0fee8ff2a3b240189c753a1d5591 > fedc%7C1%7C0%7C638295184243302189%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w > LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C > &sdata=EUZXd1aYqLQTAev8pYSKIqn%2Baj6OlNKgEeXSIhQMZRY%3D&reserved=0 > call/ERVfU5u9vwFe5VxOHcRN72EgBHY> > The usual YANG convention is for a list to be plural and the leaf > singular. You have the plural list but not the leaf. And who needs > the container? This is mpls not a common module that might be > augmented so what does the container give apart from complexity? > > (Note that this is contradicting the above.) > > > RFC 9243 has plural for leaf-list interfaces { > also RFC 9127 list interfaces { > > > All examples in RFC 9254 (YANG-CBOR) have singular list names > > > RFC8040: > container interfaces { > description "System interfaces."; > list interface { > > RFC6243: > container interfaces { > description "Example interfaces group"; > list interface { > description "Example interface entry"; > > The singular list name seems to be quite popular with a plural container name. > Where there is no such container name, it gets a bit more mixed. > > Is there a document that I could consult? > > Grüße, Carsten > > _______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod _______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
