Re: [yang-doctors] Features and must-condition

Martin Bjorklund <mbj@tail-f.com> Thu, 25 January 2018 07:33 UTC

Return-Path: <mbj@tail-f.com>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 42A6912E042 for <yang-doctors@ietfa.amsl.com>; Wed, 24 Jan 2018 23:33:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=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 Uh2PJIcePLee for <yang-doctors@ietfa.amsl.com>; Wed, 24 Jan 2018 23:33:00 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id A7B0F1275C5 for <yang-doctors@ietf.org>; Wed, 24 Jan 2018 23:33:00 -0800 (PST)
Received: from localhost (unknown [173.38.220.56]) by mail.tail-f.com (Postfix) with ESMTPSA id C7E251AE0290; Thu, 25 Jan 2018 08:32:59 +0100 (CET)
Date: Thu, 25 Jan 2018 08:32:59 +0100
Message-Id: <20180125.083259.831686468389092592.mbj@tail-f.com>
To: exa@juniper.net
Cc: mjethanandani@gmail.com, yang-doctors@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <20180125042444.vtdozlf7mm7wpcz5@smtp.juniper.net>
References: <283f5774-5995-6ae3-16b7-385b8ea270d1@cisco.com> <E5618F14-46C8-40BB-9116-9E4A866575BC@gmail.com> <20180125042444.vtdozlf7mm7wpcz5@smtp.juniper.net>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/e6AYM00BFA8u_Gl0kV8aWPnpn28>
Subject: Re: [yang-doctors] Features and must-condition
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 25 Jan 2018 07:33:03 -0000

Hi,

Ebben Aries <exa@juniper.net> wrote:
> I'm not sure I understand the intent of the newly proposed text
> 
> I'm reading this as now stating that if a 'feature' is optional, then a
> 'feature' should be defined.  I think the old text was mostly correct in
> what is trying to be conveyed.

This was also my reaction to the new text.

> How about something like:
> 
>    If a data definition is optional which depends on server support then
>    a YANG 'feature' statement SHOULD be defined and conveyed through a
>    NETCONF or RESTCONF protocol capability.  The defined 'feature'
>    SHOULD then be used in the conditional 'if-feature' statement
>    referencing the optional data definition.

Or keep the protocol thing out of this text; this is a guideline to
the *model writer*.

    If a data definition is optional which depends on server support then
    a YANG 'feature' statement SHOULD be defined.  The defined 'feature'
    SHOULD then be used in the conditional 'if-feature' statement
    referencing the optional data definition.


/martin


> 
> On Jan 24 10:49 AM, Mahesh Jethanandani wrote:
> > How does one define a feature statement that indicates support for NETCONF or RESTCONF protocol capability? I thought feature statements were for features within the module.
> > 
> > > On Jan 24, 2018, at 5:54 AM, Benoit Claise <bclaise@cisco.com> wrote:
> > > 
> > > Btw, along the same lines, in section 4.5
> > > OLD:
> > >    If a data definition is optional, depending on server support for a
> > >    NETCONF or RESTCONF protocol capability, then a YANG 'feature'
> > >    statement SHOULD be defined to indicate that the NETCONF or RESTCONF
> > >    capability is supported within the data model.
> > > 
> > > NEW:
> > >    If a feature or a set of data definitions is optional, depending on server support for a
> > >    NETCONF or RESTCONF protocol capability, then a YANG 'feature'
> > >    statement SHOULD be defined to indicate that the NETCONF or RESTCONF
> > >    capability is supported within the data model.
> > > It will also be in my AD review email.
> > > 
> > > Regards, B.
> > >> Hi Jürgen, 
> > >> 
> > >> I like it. 
> > >> I'm busy with the RFC6087bis AD review and it will be part of the feedback. 
> > >> 
> > >> Regards, Benoit 
> > >>> On Tue, Jan 16, 2018 at 06:03:05PM +0100, Benoit Claise wrote: 
> > >>>> On 1/11/2018 12:28 AM, Juergen Schoenwaelder wrote: 
> > >>>>> On Wed, Jan 10, 2018 at 02:49:48PM -0800, Andy Bierman wrote: 
> > >>>>>> The feature-per-leaf approach should not be approved by YD. 
> > >>>> Do we want to add a sentence in 
> > >>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__tools.ietf.org_html_draft-2Dietf-2Dnetmod-2Drfc6087bis-2D15-23section-2D4.17&d=DwIFaQ&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=GIehbDpQlo31lSi6WbnEkA&m=7ZRQ7cSbMoQOwcUvfJf7Q1kdto8zoglQ4ZHXDURQl3s&s=uU5M6cHYuTrKiyxOMMI8MKvBIpYS_yg1VSIYI4MfxKo&e= <https://urldefense.proofpoint.com/v2/url?u=https-3A__tools.ietf.org_html_draft-2Dietf-2Dnetmod-2Drfc6087bis-2D15-23section-2D4.17&d=DwIFaQ&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=GIehbDpQlo31lSi6WbnEkA&m=7ZRQ7cSbMoQOwcUvfJf7Q1kdto8zoglQ4ZHXDURQl3s&s=uU5M6cHYuTrKiyxOMMI8MKvBIpYS_yg1VSIYI4MfxKo&e=>, 
> > >>>> expressing that a feature-per-leaf is most likely the wrong approach? 
> > >>> This is difficult to describe. Perhaps something like this is a 
> > >>> reasonably small change to the existing text (which only talks about 
> > >>> too big features but not about too small features). 
> > >>> 
> > >>> OLD 
> > >>> 
> > >>>     The YANG "feature" statement is used to define a label for a set of 
> > >>>     optional functionality within a module.  The "if-feature" statement 
> > >>>     is used in the YANG statements associated with a feature. 
> > >>> 
> > >>>     The set of YANG features available in a module should be considered 
> > >>>     carefully.  The description-stmt within a feature-stmt MUST specify 
> > >>>     any interactions with other features. 
> > >>> 
> > >>>     If there is a large set of objects... 
> > >>> 
> > >>> NEW 
> > >>> 
> > >>>     The YANG "feature" statement is used to define a label for a set of 
> > >>>     optional functionality within a module.  The "if-feature" statement 
> > >>>     is used in the YANG statements associated with a feature.  The 
> > >>>     description-stmt within a feature-stmt MUST specify any 
> > >>>     interactions with other features. 
> > >>> 
> > >>>     The set of YANG features defined in a module should be considered 
> > >>>     carefully. Very fine granular features increase interoperability 
> > >>>     complexity and should be avoided. A likely misuse of the feature 
> > >>>     mechanism is the tagging of individual leafs (e.g., counters) with 
> > >>>     separate features. 
> > >>> 
> > >>>     If there is a large set of objects... 
> > >>> 
> > >>> /js 
> > >>> 
> > >> 
> > > 
> > > _______________________________________________
> > > yang-doctors mailing list
> > > yang-doctors@ietf.org
> > > https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ietf.org_mailman_listinfo_yang-2Ddoctors&d=DwIFaQ&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=GIehbDpQlo31lSi6WbnEkA&m=7ZRQ7cSbMoQOwcUvfJf7Q1kdto8zoglQ4ZHXDURQl3s&s=Uah4DbYVrvtZTrkciA0m1OfOgmwMXrRg_tjGmG0iX8I&e=
> > 
> > Mahesh Jethanandani
> > mjethanandani@gmail.com
> > 
> 
> _______________________________________________
> yang-doctors mailing list
> yang-doctors@ietf.org
> https://www.ietf.org/mailman/listinfo/yang-doctors
>