Re: [netmod] WG adoption poll draft-lhotka-netmod-yang-markup-00

Robert Wilton <rwilton@cisco.com> Tue, 18 April 2017 17:08 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 0A6961292C5; Tue, 18 Apr 2017 10:08:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.522
X-Spam-Level:
X-Spam-Status: No, score=-14.522 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, 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 0T0W1gBMj749; Tue, 18 Apr 2017 10:08:35 -0700 (PDT)
Received: from aer-iport-3.cisco.com (aer-iport-3.cisco.com [173.38.203.53]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7232E1200F1; Tue, 18 Apr 2017 10:08:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=19823; q=dns/txt; s=iport; t=1492535314; x=1493744914; h=subject:to:references:cc:from:message-id:date: mime-version:in-reply-to; bh=KNydwddV1qyXhDYQXDJwIvz1x5clK/kSRLJlfJh+Gbc=; b=Yh63J+lhWusbT0sucafTDXIx36bj3sSXya9hsBwLj5ILU4AtPxv7lFIW sm+OJ7qhhTA1b2zXRuV2UNeRAwJWt6NJlL3VuYhQKoP2Bsz4gNwEJMdqm Fu/EFH1H185AurJtwKaKP6gmh9FAafzlAPO2m9VxjHLmcaj8U+pY+epwi Y=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0DzAQA8R/ZY/xbLJq1cGQEBAQEBAQEBAQEBBwEBAQEBhDQxWoNmihVzkE8hlWGCDyiFfAKEMxgBAgEBAQEBAQFrKIUVAQEBAQIBI1YFBwQLEAUBAicDAgJGEQYNBgIBAYoNCKsbgiYringBAQEBAQEBAQEBAQEBAQEBAQEBAQEdhlKCCAqCY4E8hiGCXwWLMYsDhm6HBItmglWIFoZdi3GIHR84gQUmHQgYFYU2gXQ/NYkLAQEB
X-IronPort-AV: E=Sophos;i="5.37,219,1488844800"; d="scan'208,217";a="652254887"
Received: from aer-iport-nat.cisco.com (HELO aer-core-2.cisco.com) ([173.38.203.22]) by aer-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Apr 2017 17:08:32 +0000
Received: from [10.63.23.150] (dhcp-ensft1-uk-vla370-10-63-23-150.cisco.com [10.63.23.150]) by aer-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id v3IH8Vq7006778; Tue, 18 Apr 2017 17:08:31 GMT
To: Andy Bierman <andy@yumaworks.com>
References: <10335DBC-AF4B-4CEF-AC4C-F0E4D27C13A6@juniper.net> <m2d1ck1o5q.fsf@birdie.labs.nic.cz> <80e51c0a-9463-8ebe-c35d-9f1fae8c07e9@cisco.com> <m28tn5u6rv.fsf@birdie.labs.nic.cz> <20170412130207.GA83817@elstar.local> <CABCOCHQ4g6RZc=Jj0zqEu8Sydo8HHOHpfMMFFX7JRCnUAnvm6A@mail.gmail.com> <06e201d2b44f$35c0a780$4001a8c0@gateway.2wire.net> <82424428-C5C0-4EA8-BBD2-6F52EEFD300F@nic.cz> <CABCOCHSjWW6GFH-sBCUq1NaDS89yid7PMbvqYwOwjEvSsOJmZg@mail.gmail.com> <f3b07f2c-9cf6-843f-48e7-1b1e813c2a77@cisco.com> <CABCOCHSsp5yc3gP=5dSL+BuEg87KdyZUa99p0h4PNwHffgrFqw@mail.gmail.com>
Cc: Ladislav Lhotka <lhotka@nic.cz>, "t.petch" <ietfc@btconnect.com>, Jürgen Schönwälder <j.schoenwaelder@jacobs-university.de>, Kent Watsen <kwatsen@juniper.net>, NETMOD WG <netmod@ietf.org>, NetMod WG Chairs <netmod-chairs@ietf.org>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <c2049269-9492-ea2f-63cd-afdf3b026d6a@cisco.com>
Date: Tue, 18 Apr 2017 18:08:32 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <CABCOCHSsp5yc3gP=5dSL+BuEg87KdyZUa99p0h4PNwHffgrFqw@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------D64175936175313A231AFB47"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/NVb_9ywnyeH0R-8MAbQp601q-eM>
Subject: Re: [netmod] WG adoption poll draft-lhotka-netmod-yang-markup-00
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, 18 Apr 2017 17:08:38 -0000


On 18/04/2017 17:31, Andy Bierman wrote:
>
>
> On Tue, Apr 18, 2017 at 2:32 AM, Robert Wilton <rwilton@cisco.com 
> <mailto:rwilton@cisco.com>> wrote:
>
>
>
>     On 13/04/2017 17:08, Andy Bierman wrote:
>>
>>
>>     On Thu, Apr 13, 2017 at 5:45 AM, Ladislav Lhotka <lhotka@nic.cz
>>     <mailto:lhotka@nic.cz>> wrote:
>>
>>
>>         > On 13 Apr 2017, at 13:34, t.petch <ietfc@btconnect.com
>>         <mailto:ietfc@btconnect.com>> wrote:
>>         >
>>         >
>>         > ----- Original Message -----
>>         > From: "Andy Bierman" <andy@yumaworks.com
>>         <mailto:andy@yumaworks.com>>
>>         > Sent: Wednesday, April 12, 2017 5:44 PM
>>         >
>>         >> On Wed, Apr 12, 2017 at 6:02 AM, Juergen Schoenwaelder <
>>         >> j.schoenwaelder@jacobs-university.de
>>         <mailto:j.schoenwaelder@jacobs-university.de>> wrote:
>>         >>
>>         >>> I think it is crucial that descriptions etc. remain human
>>         readable
>>         >>> using plain text readers. Having to run a renderer to
>>         make sense out
>>         >>> of descriptions etc. would be a big failure and things
>>         are even
>>         > worse
>>         >>> if modules use different dialects all over the place.
>>         >>>
>>         >>> I believe there is way more important work to get done
>>         than this
>>         > (and
>>         >>> I fear endless discussions about which adapted subsets of
>>         markdown
>>         > or
>>         >>> (whatever comes next) to use). I do not object this work,
>>         but I also
>>         >>> do not support it at this point in time.
>>         >>>
>>         >>>
>>         >> +1
>>         >>
>>         >> IMO this makes YANG less readable, especially without any
>>         agreement
>>         >> on the specific markup supported. A YANG module should be
>>         readable by
>>         > humans
>>         >> without any special tools required.
>>         >
>>         > I agree.  I would say that if you cannot say it in
>>         text/plain, then you
>>         > probably should not be saying it (something I would extend
>>         to e-mail but
>>         > realise that I am less likely to get support there:-)
>>
>>         OK, so if somebody writes
>>
>>         leaf foo {
>>             description "This is my *favourite* leaf.";
>>             type string;
>>         }
>>
>>
>>     Your premise is that the description-stmt is for the
>>     benefit of the model writer, not the model reader.
>>     Since YANG explicitly states this statement contains a human-readable
>>     string, it seems clear the benefit to the readers is more important.
>
>     I see that the benefit of allowing markdown really is for the
>     model reader.  Longer term, I assume that operators using YANG
>     models probably won't interact so much with the raw YANG models
>     themselves, but will be much more likely to interact with the
>     constructed tree structure through a web browser, or generated APIs.
>
>
> IMO it is more robust not to assume people never see the real YANG 
> statements.
I don't want the real YANG statements to become unreadable or even less 
readable.  But I think that description formatted as markdown is quite 
readable anyway (which is why people choose to use it).


> What if these tools have bugs?  How would we ever know?
>
>     Allowing markup, e.g. so a paragraph of text can re-flow to fill a
>     box seems useful to me, as does some sort of emphasis and lists.
>
>
>
> This part confuses me.  I've written YANG to HTML tools (e.g., 
> netconfcentral.org <http://netconfcentral.org>).
> The tool has to render the entire module, not individual 
> description-stmts.
> Emphasis is usually formula-driven (like the keywords). The tool has 
> to know about the entire YANG module, not
> just the descriptions.
You render the module exactly as you do today, but allows the 
description statements to be formatted cleanly.

E.g. looking at your tool, the formatting of the description text looks 
a bit clunky in places.  In some places, you have a wide box, but the 
description is rendered in a monospace format, with lines artificially 
wrapping half way across the box.  It seems that the description isn't 
being treated as a string so much as a manual space character formatted 
block of text.

In other places, you have allowed the description statement to re-flow 
to fit the box, but this will be messy/wrong if the author has used 
whitespace to format the description.

Using markup would allow both cases to rendered correctly.

>
>
>     I also note that quite a lot (most?) language API documentation
>     tools generally take some form of structured text, rather than
>     relying on text/plain.
>
>
> This makes sense if
>   (1) the entire document is subject to markup, not little pieces
The rest of YANG is already structured, no markup is required.


>   (2) the only tool that needs to use the raw markup is a browser
It doesn't have to just be a browser, it can be rendered for anything.  
Browser, print, mobile, whatever.


>   (3) the actual markup allowed is strictly controlled and standardized
This I agree with, hence why I proposed that only a small common subset 
of markdown be specified.

>
>
>     But I do agree to the point that this work seems less urgent than
>     some of other items that are being worked on in NETMOD.
>
>
> Good -- work such as the OpenConfig module catalog will have a much 
> bigger impact
> demystifying YANG than bold text or an IMG bullet points instead of *.
>
>
>     Rob
>
>
>
>
>
>
>
> Andy
>
Rob