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

Robert Wilton <rwilton@cisco.com> Tue, 16 January 2018 16:01 UTC

Return-Path: <rwilton@cisco.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 4824612D7E2 for <netmod@ietfa.amsl.com>; Tue, 16 Jan 2018 08:01:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.511
X-Spam-Level:
X-Spam-Status: No, score=-14.511 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com
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 Y2Dvytvv-FCW for <netmod@ietfa.amsl.com>; Tue, 16 Jan 2018 08:01:52 -0800 (PST)
Received: from aer-iport-2.cisco.com (aer-iport-2.cisco.com [173.38.203.52]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A9A3612D833 for <netmod@ietf.org>; Tue, 16 Jan 2018 08:01:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2518; q=dns/txt; s=iport; t=1516118511; x=1517328111; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=8SEMMdlzHv5a9eW5Kh2XKPJoqOAShjHXPGW5MBpVoxQ=; b=WCXg/ZxOCi+K1J5YGhERT4vGXmmFUsWLAVOdJmZO8EQdycSy1NLI31n9 UrDKRpbbTxGDeaGcnf4YG3mwvy8K1CUJ92hQ+f6dz39lx3NJKpVFGajng WLTez8sIdnPE0/XPAbJawLZZIl4TzgcukG+wqTQuWHzH+2A2y2ZFrbtob g=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0AQAgA0IF5a/xbLJq1cGQEBAQEBAQEBAQEBAQcBAQEBAYMRgRZ0J4QTixiPRyeZQgoYC4RJTwKFHxQBAQEBAQEBAQFrKIUkAQEBAwEBIQ8BBTYLEAsOCgICJgICJzAGAQwGAgEBF4oYEKVIgieJSgEBAQEBAQEBAQEBAQEBAQEBAQEBARgFgQ+HGYFpKQyCeYMvAQEChQaCZQWSJ5E9lUuMJYdrjxyICYE8NiKBUDIaCBsVPYIqhFdBN40/AQEB
X-IronPort-AV: E=Sophos;i="5.46,368,1511827200"; d="scan'208";a="1482317"
Received: from aer-iport-nat.cisco.com (HELO aer-core-2.cisco.com) ([173.38.203.22]) by aer-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jan 2018 16:01:49 +0000
Received: from [10.63.23.131] (dhcp-ensft1-uk-vla370-10-63-23-131.cisco.com [10.63.23.131]) by aer-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id w0GG1mCX002666; Tue, 16 Jan 2018 16:01:49 GMT
To: Martin Bjorklund <mbj@tail-f.com>, vladimir@transpacket.com
Cc: netmod@ietf.org
References: <aa7a1449-fd6e-e4c6-7568-41061c09d9f2@transpacket.com> <20180116.115606.561861432247288407.mbj@tail-f.com> <e94d1ed3-e859-3167-501f-ce23e77804df@transpacket.com> <20180116.164053.2123534827829006518.mbj@tail-f.com>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <e63efa9f-3114-d59d-e1d8-e62602a830c5@cisco.com>
Date: Tue, 16 Jan 2018 16:01:48 +0000
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0
MIME-Version: 1.0
In-Reply-To: <20180116.164053.2123534827829006518.mbj@tail-f.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/4gj_SWbkzwEXPRKhEPYgEpFANT0>
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 16:01:58 -0000


On 16/01/2018 15:40, Martin Bjorklund wrote:
> 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

Definition of symbols should be precise/consistent, so that readers can 
consistently interpret tree diagrams.

I think that flexibility in layout should be OK, but the draft should 
provide guideline to ensure the output is readable, and likely to be 
broadly consistent (since consistency aids readability).

If the IETF data modeling group is trying to specify text output 
precisely enough that it can be screen scraped then we may want to 
consider whether we are focusing on the right solution ;-)

In summary, (2) is my preference, followed by (1), followed by (3).

Thanks,
Rob

>
>
> /martin
>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
> .
>