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

Vladimir Vassilev <vladimir@transpacket.com> Tue, 16 January 2018 19:19 UTC

Return-Path: <vladimir@transpacket.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 2A2BC12EAA4 for <netmod@ietfa.amsl.com>; Tue, 16 Jan 2018 11:19:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-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 c-MinCYzSP2t for <netmod@ietfa.amsl.com>; Tue, 16 Jan 2018 11:19:42 -0800 (PST)
Received: from mail.transpacket.com (s91205186171.blix.com [91.205.186.171]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 139811242F5 for <netmod@ietf.org>; Tue, 16 Jan 2018 11:19:41 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by mail.transpacket.com (Postfix) with ESMTP id E0B3214621B5; Tue, 16 Jan 2018 20:19:39 +0100 (CET)
Received: from mail.transpacket.com ([127.0.0.1]) by localhost (mail.transpacket.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id OHKp_wIZ3tXV; Tue, 16 Jan 2018 20:19:39 +0100 (CET)
Received: from localhost (localhost [127.0.0.1]) by mail.transpacket.com (Postfix) with ESMTP id B050014621B9; Tue, 16 Jan 2018 20:19:39 +0100 (CET)
Received: from mail.transpacket.com ([127.0.0.1]) by localhost (mail.transpacket.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id FZ6Srj0WpCYW; Tue, 16 Jan 2018 20:19:39 +0100 (CET)
Received: from [192.168.43.32] (77.16.194.13.tmi.telenormobil.no [77.16.194.13]) by mail.transpacket.com (Postfix) with ESMTPSA id 6284014621B5; Tue, 16 Jan 2018 20:19:39 +0100 (CET)
To: joel jaeggli <joelja@bogus.com>, Robert Wilton <rwilton@cisco.com>, Martin Bjorklund <mbj@tail-f.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> <e63efa9f-3114-d59d-e1d8-e62602a830c5@cisco.com> <a2c75af7-c5b9-f277-1d04-5891dc97c0d2@bogus.com>
From: Vladimir Vassilev <vladimir@transpacket.com>
Message-ID: <2585727d-80df-a4bc-e1e5-64f4575aac9f@transpacket.com>
Date: Tue, 16 Jan 2018 20:19:38 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
MIME-Version: 1.0
In-Reply-To: <a2c75af7-c5b9-f277-1d04-5891dc97c0d2@bogus.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/w7eZQiYK7qt-T72z5cIqele39bs>
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 19:19:44 -0000

On 01/16/2018 06:34 PM, joel jaeggli wrote:

>
> On 1/16/18 8:01 AM, Robert Wilton wrote:
>>
>> On 16/01/2018 15:40, Martin Bjorklund wrote:
>>> Vladimir Vassilev <vladimir@transpacket.com> wrote:
> <snip>
>>> 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 ;-)
> I would hope that we are not, as the diagrams are programmatically
> generated if you wanted to for example validate them one should do that
> from the sources.
>
> Approaches that result in the most easily human readable, followed by
> consistency between tools is probably better for that. That said this is
> almost the indentation wars so the proscriptive it gets the more dissent
> you can probably find (e.g. 3).
To make it clear I think 1) works with the text proposed by Martin.

As said I posted the pyang alignment algorithm description in a sort of 
2) variant only for reference on the mailing list since I implemented 
that too. Starting indentation war was not my intention.

As for the automated validation of the tree diagrams as an added value 
to the human readability I have the following thoughts. I would like to 
be able to compare unlimited line length tree outputs generated by 
different YANG compilers for equality. This is mainly a way to have some 
partial common denominator output for validating YANG is correctly 
compiled which we did not have until now. For example as soon as I have 
support for Schema mount I would compare the tree output with another 
tool known to work and add some testcases based on that. I do not see 
any automated alternative for doing this except writing NETCONF chat 
scripts (also module specific), or writing not only YANG module specific 
but also API specific test cases as 3rd option. 1) does not compromise 
this automated validation option since space sequences can be collapsed 
to single space. If the alignment algorithm was creating a possibility 
for nontrivial output variation then I would have supported strongly 3) 
but this is not the current case.

Vladimir
>
>> In summary, (2) is my preference, followed by (1), followed by (3).
>>
>> Thanks,
>> Rob
>>
>>>
>>> /martin
>>>