Re: Lines too long in YANG tree diagrams
Kent Watsen <[email protected]> Wed, 5 Jul 2023 22:18:14 +0000
| Newsgroups | gmane.ietf.netmod,gmane.ietf.ccamp |
|---|---|
| Message-ID | <0100018928227568-5eface92-f334-4b2a-b168-847cb37d161c-000000@email.amazonses.com> |
Hi Italo, > On Jul 5, 2023, at 5:58 PM, Italo Busi <Italo.Busi=40huawei.com-Tr9gZwTxerDR74oF6e/[email protected]> wrote: > > RFC8340 suggests to use the "--tree-line-length 69" option to produce YANG tree diagrams to be included into an Internet-Draft or RFC. > > Although this option works well in many cases, there are few cases where pyang produces YANG tree diagram with lines too long even with the "--tree-line-length 69" option and in this case it is not fully clear what could be done when including those YANG tree diagram into Internet-Drafts or RFCs > > Section 5.2 of RFC8792 says: > > It is RECOMMENDED that authors do as much as possible within the selected format to avoid long lines. > > My interpretation of the RECOMMENDED key word and of “as much as possible” is that we MUST always use the "--tree-line-length 69" option to generate the YANG tree diagrams to be included into Internet-Drafts or RFCs and that we MAY use RFC8792 tool to fold the YANG tree diagrams when they contain lines too long > > Is my interpretation correct? Sounds right to me, and is what my automation scripts do. Pro-tip: `rfcfold` won’t fold a file that doesn’t need folding, i.e., the output file will equal the input file. > Thanks, Italo K.