Re: [netmod] example modules in 6087bis

Benoit Claise <bclaise@cisco.com> Mon, 23 January 2017 17:46 UTC

Return-Path: <bclaise@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 50CC91296CB for <netmod@ietfa.amsl.com>; Mon, 23 Jan 2017 09:46:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.72
X-Spam-Level:
X-Spam-Status: No, score=-17.72 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=-3.199, 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 Q7T9a_OVpLxE for <netmod@ietfa.amsl.com>; Mon, 23 Jan 2017 09:46:47 -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 C784D1296CA for <netmod@ietf.org>; Mon, 23 Jan 2017 09:46:46 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=19498; q=dns/txt; s=iport; t=1485193606; x=1486403206; h=subject:to:references:cc:from:message-id:date: mime-version:in-reply-to; bh=pRP40XLpZPlZF6Hifn2Rg4TqPy69v6+KuXCs543NdRY=; b=Kmv4YtebXuv+LZi2Qs+7WcHisu/5zdLmFQs/7pBac+e9F6Z08IYIvUvB /m3HAPUlrxDJqeMo/ltOvCogiG6Cjn+nsXQE9jEE31jmFHWMy87KZkpQD dKC6Gd+HA5zIebs8zO01nwh+NytTqOB6f7A3Mdp17nldEZ+FCEX3KOpI5 g=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0BpAgC+QIZY/xbLJq1dGQEBAQEBAQEBAQEBBwEBAQEBgz0BAQEBAX8qX4NTgQSJBHKRE5ADhSuCDR8BDIUsSgKCPhgBAgEBAQEBAQFjKIRqAQEEAQEhSwsQCxgnAwICJx8RBg0GAgEBiQgOrFqCJSuKIwEBAQEBAQEBAQEBAQEBAQEBAQEBAR2GS4IFgmuEVYJ6gl4FjyyMH4ZigxmHb4F3UodnI4YbiniHfh84gRcTCBUVOoQBgjY9NQEBhV8rghABAQE
X-IronPort-AV: E=Sophos;i="5.33,275,1477958400"; d="scan'208,217";a="649068788"
Received: from aer-iport-nat.cisco.com (HELO aer-core-3.cisco.com) ([173.38.203.22]) by aer-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jan 2017 17:46:43 +0000
Received: from [10.60.67.85] (ams-bclaise-8914.cisco.com [10.60.67.85]) by aer-core-3.cisco.com (8.14.5/8.14.5) with ESMTP id v0NHkhNp020432; Mon, 23 Jan 2017 17:46:43 GMT
To: Andy Bierman <andy@yumaworks.com>
References: <20170116.164803.729427888661667991.mbj@tail-f.com> <c41146ec-3db9-1752-d32f-0367418c7e66@cisco.com> <CABCOCHRkFwDrQrGqk61nh-3fc+emtJEshdEMqA+G4r2YaKxwdg@mail.gmail.com>
From: Benoit Claise <bclaise@cisco.com>
Message-ID: <003354d9-841f-37b2-a594-6e9983110984@cisco.com>
Date: Mon, 23 Jan 2017 18:46:44 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0
MIME-Version: 1.0
In-Reply-To: <CABCOCHRkFwDrQrGqk61nh-3fc+emtJEshdEMqA+G4r2YaKxwdg@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------DA9CDEE87A46C1F7EBD367CA"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/bmagcy-ZEOnFPtseCUVVWoR8q2k>
Cc: "netmod@ietf.org" <netmod@ietf.org>
Subject: Re: [netmod] example modules in 6087bis
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.17
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: Mon, 23 Jan 2017 17:46:49 -0000

On 1/18/2017 7:00 PM, Andy Bierman wrote:
>
>
> On Wed, Jan 18, 2017 at 9:12 AM, Benoit Claise <bclaise@cisco.com 
> <mailto:bclaise@cisco.com>> wrote:
>
>     Martin,
>>     Hi,
>>
>>     It turns out that the recommendations on example modules are a bit
>>     unclear.  Different drafts do very different things.  Some examples:
>>
>>     https://tools.ietf.org/html/draft-ietf-i2rs-yang-l3-topology-08#section-6.1.2
>>     <https://tools.ietf.org/html/draft-ietf-i2rs-yang-l3-topology-08#section-6.1.2>
>>
>>     This example module really looks like a real module.  It uses an
>>     IANA-controlled namespace, and the meta-statements indicate that this
>>     is a normative modules.  But the module does not use the <CODE> tags.
>>
>>
>>     https://tools.ietf.org/html/draft-ietf-netconf-restconf-18#appendix-C.1
>>     <https://tools.ietf.org/html/draft-ietf-netconf-restconf-18#appendix-C.1>
>>
>>     This module is better, but it is written to follow RFC 6087 rules
>>     (pass pyang --ietf), with the result that it contains a bit of "noise"
>     It takes a lot of YANG experience to be able to distinguish what
>     is noise or not. 
>
> I agree.  I see Martin's point though -- maintenance clauses like 
> contact and organization
> are not really needed for examples.
>
>>     with some meaningless descriptions and meta-statements.  It also does
>>     not use <CODE> tags.
>>
>>
>>     A good example (IMO) is found in
>>     https://tools.ietf.org/html/rfc8022#appendix-C
>>     <https://tools.ietf.org/html/rfc8022#appendix-C>
>>
>>     It uses descriptions when necessary (high s/n), no fake
>>     meta-statements etc.
>>
>>     However, it might be a good idea to require example modules to have a
>>     "description" statement that explains what the module examplifies.
>>     For example, the example-rip could have:
>>
>>        description
>>          "This example module demonstrates how the core routing data model
>>           can be extended to support a new control-plane protocol.  It is
>>           intended as an illustration rather than a real definition of a
>>           data model for the Routing Information Protocol (RIP).";
>>
>>
>>
>>     I think that 6087bis is clear when it says:
>>
>>        The guidelines in this document refer mainly to a normative complete
>>        module or submodule, but may be applicable to example modules and
>>        YANG fragments as well.
>>
>>     I think this states that example modules do not have to pass pyang
>>     --ietf.
>>
>>
>>     In order to make this more clear, I suggest the following changes to
>>     draft-ietf-netmod-rfc6087bis-09
>>
>>     In the Terminology section 2.4:
>>
>>     NEW:
>>
>>        o  Example module:  A complete YANG module or submodule that is
>>           intended to illustrate some specific aspect, but not intended for
>>           actual use.
>     It doesn't solve this issue, because
>     https://tools.ietf.org/html/draft-ietf-netmod-rfc6087bis-09#section-4.2.1
>     <https://tools.ietf.org/html/draft-ietf-netmod-rfc6087bis-09#section-4.2.1>
>     says:
>
>           The <CODE BEGINS> convention SHOULD be used for complete example
>           modules, but not YANG fragments.
>
>     That implies to me that we have 3 types: 1. _complete _example
>     modules => I read it that they must pass pyang -ietf, SHOULD have
>     <CODE BEGINS>     If there is <CODE BEGINS>, it's because people
>     will want to extract it, and play with it. So the tools chain must
>     work 2. the other example modules. No <CODE BEGINS>. I guess they
>     don't pass pyang 3. YANG fragments. No <CODE BEGINS>. I guess they
>     don't pass pyang In practice, 2 and 3 are the same. So we need
>     just two definition Scrap "complete" would help but that's not
>     enough:
>
>       The <CODE BEGINS> convention SHOULD be used for example
>       modules, but not YANG fragments.
>
>     We only need to clarify 3 points     <CODE BEGINS>, yes/no    
>     pyang, yes/no     pyang --ietf yes/no I guess we want, putting all
>     this together:
>
>        o  Example module:  A complete YANG module or submodule that is
>           intended to illustrate some specific aspect, but not intended for
>           actual use. Example module MUST be valid according to RFC 7950,
>           except when they are used to illustrate some illegal constructs.
>           Example module MAY be valid according to the rules in this document.
>
>        o  YANG fragment:  A incomplete YANG module or submodule that is
>           intended to illustrate some specific aspect, but not intended for
>           actual use. YANG fragments MUST be valid according to RFC 7950,
>           except when they are used to illustrate some illegal constructs.
>
> This is good
> I prefer:
>    - MUST use CODE BEGINS for a real module
>    - MUST NOT use CODE BEGINS for an example module
>    - MUST pass pyang --ietf for a real module
>    - MUST pass pyang for example module
Fine with me. Consistency is key here. Is it time to conclude this 
discussion? Regards, Benoit
> I have already received private emails about implementing the 
> example-jukebox
> module in RESTCONF as part of the standard.  We already have operational
> experience that people can be confused by the example modules, and
> think they are supposed to be implemented for RFC compliance.
>
>       The <CODE BEGINS> convention SHOULD be used for example
>       modules that pass validation according to RFC 7950.
>
>       The <CODE BEGINS> convention MUST NOT be used for YANG fragment
>       and for example modules that are used to illustrate some illegal constructs
>       (therefore failing validation according to RFC 7950).
>
> This text concerns me a little
> We are not following the <CODE BEGINS> anywhere for examples.
> the tools are extracting anything that starts "module blah".
> IMO this makes it easier to confuse real and example modules.
> I would prefer to consider only real modules as Code Components.
> (We collect broken modules to test the compiler in modules/test/fail 
> folder,
> so even bad modules might be extracted.)
>
>>     In section 4:
>>
>>     NEW:
>>
>>         All normative modules or submodules, example modules or submodules,
>>         and example YANG fragments MUST be valid according to RFC 7950,
>>         except when they are used to illustrate some illegal constructs.
>     We wouldn't need this if you take my proposal
>>     In Section 4.2.1 "Example Modules":
>>
>>     NEW:
>>
>>        An example module SHOULD have a namespace on the form
>>
>>          ohttp://example.com/<module-name> OR
>>          o  urn:example:<module-name>
>>
>>        An example module SHOULD have a description statement that describes
>>        that it is an example module, and what it examplifies.
>>
>>        An example module SHOULD NOT have any additional meta-statements
>>        (i.e., "organization", "contact", or "reference").
>>
>>        An example module SHOULD use the "description" statement in any
>>        definition where it is required to understand the example.
>>
>     Fine. Note that the RESTCONF RFC publication depends on this
>     RFC6087bis convention. So let's quickly come to a conclusion.
>     Regards, Benoit
>
> Andy
>
>>     /martin
>>
>>     _______________________________________________
>>     netmod mailing list
>>     netmod@ietf.org <mailto:netmod@ietf.org>
>>     https://www.ietf.org/mailman/listinfo/netmod
>>     <https://www.ietf.org/mailman/listinfo/netmod>
>>     .
>>
>     _______________________________________________ netmod mailing
>     list netmod@ietf.org <mailto:netmod@ietf.org>
>     https://www.ietf.org/mailman/listinfo/netmod
>     <https://www.ietf.org/mailman/listinfo/netmod> 
>