Re: [netmod] xpaths and Wrapping Long Lines - draft-ietf-netmod-yang-tree-diagrams-03
Martin Bjorklund <mbj@tail-f.com> Thu, 21 December 2017 14:03 UTC
Return-Path: <mbj@tail-f.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A084912D873; Thu, 21 Dec 2017 06:03:34 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vYCJilwUSFu0; Thu, 21 Dec 2017 06:03:33 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id D13C112D7F7; Thu, 21 Dec 2017 06:03:32 -0800 (PST)
Received: from localhost (h-85-209.A165.priv.bahnhof.se [94.254.85.209]) by mail.tail-f.com (Postfix) with ESMTPSA id A5A841AE0311; Thu, 21 Dec 2017 15:03:30 +0100 (CET)
Date: Thu, 21 Dec 2017 15:03:30 +0100
Message-Id: <20171221.150330.1658491882772367375.mbj@tail-f.com>
To: ianfarrer@gmx.com
Cc: j.schoenwaelder@jacobs-university.de, netmod@ietf.org, draft-ietf-netmod-yang-tree-diagrams@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <ED2AE08B-251D-4697-8E4E-2E8F3C6B5828@gmx.com>
References: <20171221.113947.2011578475461538770.mbj@tail-f.com> <20171221104328.ssex3bvj5zuxsjeo@elstar.local> <ED2AE08B-251D-4697-8E4E-2E8F3C6B5828@gmx.com>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/Xw_m9CC_tGH5Ghfz-GJDQ2EP8V0>
Subject: Re: [netmod] xpaths and Wrapping Long Lines - draft-ietf-netmod-yang-tree-diagrams-03
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Dec 2017 14:03:34 -0000
Ian Farrer <ianfarrer@gmx.com> 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 <j.schoenwaelder@jacobs-university.de> 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 > > netmod@ietf.org > > https://www.ietf.org/mailman/listinfo/netmod >
- [netmod] xpaths and Wrapping Long Lines - draft-i… Ian Farrer
- Re: [netmod] xpaths and Wrapping Long Lines - dra… Ladislav Lhotka
- Re: [netmod] xpaths and Wrapping Long Lines - dra… Ian Farrer
- Re: [netmod] xpaths and Wrapping Long Lines - dra… Martin Bjorklund
- Re: [netmod] xpaths and Wrapping Long Lines - dra… Juergen Schoenwaelder
- Re: [netmod] xpaths and Wrapping Long Lines - dra… Robert Wilton
- Re: [netmod] xpaths and Wrapping Long Lines - dra… Ian Farrer
- Re: [netmod] xpaths and Wrapping Long Lines - dra… Ladislav Lhotka
- Re: [netmod] xpaths and Wrapping Long Lines - dra… Martin Bjorklund