Ian Farrer <[email protected]> wrote:
> Thanks. This suggestion seems cleanest. Can the tree diagrams draft
> be updated to describe this?
I suggest we add to the section "Wrapping Long Lines"
NEW:
Long paths (e.g., leafref paths or augment targets) can be split and
printed on more than one line. For example:
augment /nat:nat/nat:instances/nat:instance/nat:mapping-table
/nat:mapping-entry:
then also fix in 2.6:
OLD:
If the type is a leafref, the type is printed as "-> TARGET",
where TARGET is either the leafref path, with prefixes removed
if possible.
NEW:
If the type is a leafref, the type is either printed as
"-> TARGET", where TARGET is the leafref path, with prefixes
removed if possible, or printed as "leafref".
FYI, I have fixed pyang so that it breaks long augment targets:
$ pyang -f tree --tree-line-length 55 x.yang
module: x
augment /y:pretty-long-identifier-name/y:shorter
/y:another-long-identifier-name
/y:also-short/y:but-this-is-long-again:
+--rw bar? string
/martin
>
> BR,
> Ian
>
>
> > On 21. Dec 2017, at 11:43, Juergen Schoenwaelder
> > <[email protected]> wrote:
> >
> > On Thu, Dec 21, 2017 at 11:39:47AM +0100, Martin Bjorklund wrote:
> >
> >> But this is in the YANG source; I think Ian asked about the tree
> >> diagram syntax. Maybe the corresponding syntax in the tree diagram
> >> could be simply:
> >>
> >> augment /nat:nat/nat:instances/nat:instance
> >> /nat:mapping-table/nat:mapping-entry:
> >
> > Works for me.
> >
> >> Or even simpler, maybe we can say that any string in the tree diagram
> >> syntax can follow the YANG string rules.
> >
> > The YANG string rules are for machines to get the parsing right. Since
> > the tree diagrams are for humans, the less noise the better.
> >
> > /js
> >
> > --
> > Juergen Schoenwaelder Jacobs University Bremen gGmbH
> > Phone: +49 421 200 3587 Campus Ring 1 | 28759 Bremen | Germany
> > Fax: +49 421 200 3103 <http://www.jacobs-university.de/>
> >
> > _______________________________________________
> > netmod mailing list
> > [email protected]
> > https://www.ietf.org/mailman/listinfo/netmod
>
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod