Re: [netmod] Comments on draft-lhotka-netmod-yang-markup-00

Robert Wilton <rwilton@cisco.com> Fri, 17 March 2017 17:15 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 25D631294E7 for <netmod@ietfa.amsl.com>; Fri, 17 Mar 2017 10:15:32 -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, 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, URIBL_BLOCKED=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 7l9MPzpDcSgO for <netmod@ietfa.amsl.com>; Fri, 17 Mar 2017 10:15:29 -0700 (PDT)
Received: from aer-iport-1.cisco.com (aer-iport-1.cisco.com [173.38.203.51]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3F9B31201F2 for <netmod@ietf.org>; Fri, 17 Mar 2017 10:15:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=5481; q=dns/txt; s=iport; t=1489770929; x=1490980529; h=subject:to:references:cc:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=ASgrSaa3L3sqja07imG0Lu25X86YOp81MjZ07jVEZb0=; b=JIHB7cFzhUeneCzsEoPKjlA7JFevoYyvXUaeewxj2feFgwIEv1Qi9lEk 6X9pSHpqe8rNNU97laxmGlA109BG1yZXG6uct/kHEBxOnalXOEHDNl3N+ yBuSE8U6n5CEZHq3Z0BdXRrqL/udCDA8AeOpoeazcvZipPSETakVVv5Vu s=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0CQAQAuGcxY/xbLJq1eGgEBAQECAQEBAQgBAQEBgyeBCypgjXFzkGeVQoIOLIV2AoM+GAECAQEBAQEBAWsohRUBAQEBAgEnEUEQCxguVwYNBgIBAYl0CA60GzqKSgEBAQEBAQEBAQEBAQEBAQEBAQEaBYZOggWCaoE8iH0BBJxJhnmLSYF7iFsjhjKLQogRHziBBCMWCBcVhSWBc0A1iVcBAQE
X-IronPort-AV: E=Sophos;i="5.36,177,1486425600"; d="scan'208";a="693063849"
Received: from aer-iport-nat.cisco.com (HELO aer-core-2.cisco.com) ([173.38.203.22]) by aer-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Mar 2017 17:15:26 +0000
Received: from [10.61.70.68] (ams3-vpn-dhcp1604.cisco.com [10.61.70.68]) by aer-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id v2HHFP1Q006794; Fri, 17 Mar 2017 17:15:26 GMT
To: Ladislav Lhotka <lhotka@nic.cz>
References: <e17f7458-1192-b0d7-d72d-4f56e4b18386@cisco.com> <EC2B7E9C-E060-4C21-9FC1-FD077B835B73@nic.cz> <18a2e042-919b-9468-2dc8-f751bd924125@cisco.com> <D40AF2AD-B025-4D1C-9B96-E3729D01BD3B@nic.cz>
Cc: "netmod@ietf.org" <netmod@ietf.org>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <77d0cd5a-2b83-1c40-c54a-a5c6212671b1@cisco.com>
Date: Fri, 17 Mar 2017 17:15:24 +0000
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1
MIME-Version: 1.0
In-Reply-To: <D40AF2AD-B025-4D1C-9B96-E3729D01BD3B@nic.cz>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/Fwd8Q21p3Fy51V8UziTqS6X_Gho>
Subject: Re: [netmod] Comments on 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: Fri, 17 Mar 2017 17:15:32 -0000


On 17/03/2017 15:08, Ladislav Lhotka wrote:
>> On 17 Mar 2017, at 15:11, Robert Wilton <rwilton@cisco.com> wrote:
>>
>>
>>
>> On 17/03/2017 12:55, Ladislav Lhotka wrote:
>>> Hi Rob,
>>>
>>> thank you for reading the draft.
>>>
>>>> On 17 Mar 2017, at 13:30, Robert Wilton <rwilton@cisco.com> wrote:
>>>>
>>>> Hi Lada,
>>>>
>>>> I've had a quick scan of your YANG markup extension draft and I have a few comments:
>>>>
>>>> Allowing description, and similar descriptive statements, to use something other than text seems like it could be useful in some cases.
>>>>
>>>> I'm not sure that allowing the statements to use any text-like media type is a good idea, this could increase the burden on tool makers if each module author chooses their own preferred format.
>>>>
>>>> Instead, I think that it might be better to restrict it to a very small set of media types, that could be extended in future.  I would think that initially just allowing plain text and one particular flavour of markdown would be a reasonable starting point.
>>> I agree although I am not sure that we can easily find an agreement on the particular flavour. So maybe we can leave it open and let the "market" decide.
>> I think that would be a mistake.  How would device/tools vendors know which versions to spend time implementing?
> I would agree to have a fixed choice in 6087bis, but there may be niche communities or special cases that need something else, so YANG IMO shouldn't preclude it a priori.
I think that this idea works quite well as a YANG extension, and that 
would be a better path than baking it into YANG at this time.

I'm still not convinced that allowing an arbitrary encoding is a good idea.

>
>>>> I think that the only formats that should be allowed are those that are still readily readable as plain text, so that tools that don't want to parse the formatted text can still sensibly display the descriptive statements.  I.e. I don't think that it would be helpful to allow things like text/xml since it isn't easy to read.
>>> Sure, and the draft says:
>>>
>>>     It is RECOMMENDED to use only media types representing "lightweight"
>>>     markup that is easy to read even in the unprocessed source form, such
>>>     as "text/markdown".
>> I was proposing REQUIRED instead of RECOMMENDED.
> I usually write my modules in the YIN format with a very restricted set of HTML tags that are used in the text arguments:
>
> https://gitlab.labs.nic.cz/labs/yang-tools/wikis/editing_yang#yin-schema-extensions
OK.  I had assumed that nobody was using YIN ;-)
>
> It would be useful to indicate "text/html" media type, and a YIN->YANG convertor could translate it e.g. to "text/markdown".
Isn't that just part of the YIN conversion to YANG. I.e. by the time the 
file is YANG it would be text/markdown.

>
>>>> Allowing this extension on particular descriptive statements may also be helpful.  It seems plausible that the vast majority of these statements in a module might just be written in plain text with just a few of them using more advanced formatting like markdown.
>>> Yes, I was thinking about this. On the other hand, plain text is typically compatible with any markup format, so this would probably be useful only if somebody wanted to use multiple different markup formats in the same module, which sounds crazy. But we can discuss it.
>> I was only thinking of a mix of some plain text descriptions and some using markup.
>>
>> Tooling may choose to format raw text differently from markup text (e.g. converting lines into a paragraph).  Also a markup processor would be extra work, and may not warn or error on the structure of a plain text description that doesn't conform to the markup rules.
> Actually, the design philosophy behind markdown is that there is no formal concept of validity and so processors should never complain.
But how does an implementation know what it needs to support so that it 
works with all descriptions?  I think that there would need to be a 
based specification to be useful.
>
> On the other hand, it is conceivable that some descriptions may use a more specialized format. For example, we could use a media type (variant) for the top-level "contact" statements that we include in modules, and tools could then more easily extract this metadata.
I'm not sure ... this is just sounding like extra work/complexity, and 
YANG is already pretty complex!

Thanks,
Rob


>
> So maybe we could really permit the "text-media-type" extension anywhere and apply some natural scoping rules.
>
> Lada
>
>>>> Finally, I have a concern that if more structured formatting in the comments is used then would that encourage model writers to produce more verbose comments, and if so that might possibly reduce the readability of the modules.  Although, I guess ultimately one has to trust the model writers to do the right thing.
>>> Well, this draft doesn't permit anything above what module writers can do already now - the descriptions etc. have to be valid YANG strings as before. The only new thing is a piece of metadata that may be helpful for some tools but that can also be safely ignored.
>> Thanks,
>> Rob
>>
>>> Thanks, Lada
>>>
>>>> Thanks,
>>>> Rob
>>>>
>>> --
>>> Ladislav Lhotka, CZ.NIC Labs
>>> PGP Key ID: 0xB8F92B08A9F76C67
>>>
>>>
>>>
>>>
>>>
>>> .
> --
> Ladislav Lhotka, CZ.NIC Labs
> PGP Key ID: 0xB8F92B08A9F76C67
>
>
>
>
>
> .
>