Re: [netmod] WGLC - draft-ietf-netmod-yang-tree-diagrams

Martin Bjorklund <mbj@tail-f.com> Tue, 16 January 2018 15:41 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 C893413155A for <netmod@ietfa.amsl.com>; Tue, 16 Jan 2018 07:41:20 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.911
X-Spam-Level:
X-Spam-Status: No, score=-1.911 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 g7IKj-0tDwsx for <netmod@ietfa.amsl.com>; Tue, 16 Jan 2018 07:41:19 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id B45EF1314F4 for <netmod@ietf.org>; Tue, 16 Jan 2018 07:40:55 -0800 (PST)
Received: from localhost (unknown [173.38.220.56]) by mail.tail-f.com (Postfix) with ESMTPSA id 886911AE0399; Tue, 16 Jan 2018 16:40:54 +0100 (CET)
Date: Tue, 16 Jan 2018 16:40:53 +0100
Message-Id: <20180116.164053.2123534827829006518.mbj@tail-f.com>
To: vladimir@transpacket.com
Cc: netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <e94d1ed3-e859-3167-501f-ce23e77804df@transpacket.com>
References: <aa7a1449-fd6e-e4c6-7568-41061c09d9f2@transpacket.com> <20180116.115606.561861432247288407.mbj@tail-f.com> <e94d1ed3-e859-3167-501f-ce23e77804df@transpacket.com>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/l4xIASa094gmPTXa0eShV_yJG8o>
Subject: Re: [netmod] WGLC - draft-ietf-netmod-yang-tree-diagrams
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: Tue, 16 Jan 2018 15:41:21 -0000

Vladimir Vassilev <vladimir@transpacket.com> wrote:
> On 01/16/2018 11:56 AM, Martin Bjorklund wrote:
> 
> > Vladimir Vassilev <vladimir@transpacket.com> wrote:

[...]

> >> There is also undocumented alignment space count function before
> >> <type> that pyang uses to align the <type> fields of child data leafs
> >> with common ancestor. If this is specified in the draft the tree
> >> output can be deterministic and for me this is an advantage. This is
> >> currently one of the few underspecified pieces of the tree format so I
> >> had to check pyang implementation in oder to generate same alignment
> >> space counts and binary identical tree output results.
> > I think that we at least should write that there may be more than one
> > space between <opts> and <type>:
> >
> >    There may be any number of additional space characters between
> >    <opts> and <type>.
> For the sake of the argument (at least having this on the mailing list
> as reference):
> 
>   <type> should be aligned at a common offset for all sibling nodes
>   from the start of <name> by adding trailing spaces. The recommended
>   offset is 3 plus the length of the longest node name among all
> sibling nodes
>   including those siblings defined under choice and case nodes.
> 
> This is what pyang does now. It is not a perfect solution but it
> allows identical output down to the bit.

Does anyone else have an opinion on this?  I can see three
alternatives:

  1) allow any number of addtional spaces
  2) allow any number of addtional spaces + define a suggested
     alignment algorithm
  3) mandate the alignment algorithm


/martin