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

Mahesh Jethanandani <mjethanandani@gmail.com> Wed, 24 January 2018 18:49 UTC

Return-Path: <mjethanandani@gmail.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 88B871275AB for <yang-doctors@ietfa.amsl.com>; Wed, 24 Jan 2018 10:49:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 fCvO3VMOVoVt for <yang-doctors@ietfa.amsl.com>; Wed, 24 Jan 2018 10:49:37 -0800 (PST)
Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id DA1071201FA for <yang-doctors@ietf.org>; Wed, 24 Jan 2018 10:49:36 -0800 (PST)
Received: by mail-it0-x22e.google.com with SMTP id m11so19208195iti.1 for <yang-doctors@ietf.org>; Wed, 24 Jan 2018 10:49:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=xJ7m2Mu9Alkjq6CUV+g1m89BIPAtklKRodMnEEkkmF4=; b=hhSI+5Rh2YsxdHDBNOCon4iynWKJcQ6Jztid2UnH6eZ0TXoxYrfs2Uht0Nltw2/Qmi +XJi3g+pGn8xXAMGeN8GU2cY9ORUSZITWWRgM1eFSnDsvewmnxiiLpE6XZ/4JTU2AL95 9sEQ9vwptSykwkO08b5mDV9v4sYV+5TMUkzLqVLNgoq6rlBSBKk9qHMCbWMSfPgQ30zV MJjOE9U8/mvkLmbaNeJYkrkgkthCciy9RNYaxF5B8EFqb8E0qgCVxeR2tVjhB+IrqWxV Q3qiesDcjbWRW2JF+9wzppasq0XRRMrynKAK+4h+CCpj/UYUvbdrvwlkrw71C6QazYA+ NS0w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=xJ7m2Mu9Alkjq6CUV+g1m89BIPAtklKRodMnEEkkmF4=; b=kqGNo+mdBRHMHsP20dqy8WsABP5ZnSQbf71md5OhwpK6wVqa288iPKLnILGgE58EOK MnOniavvw3TIdVPFfOtxgZzhephkdsSbIWli49uSUEFivaz+/clO9d2Cky9qwQ1FVMaa JhbJ5r8IHvnKAOsHsy+ES1j24+AmBk5UgU5mshXfx7gkEWO7FH1acmEpKQ1/6HhaS2xp slv9CdWXgd7kROy66ThM6QFT/M60Y/iFvMhnMAwwWmRTFSBGT1Yt24tmYS70CkneuNjy LT8USr9PoQh3KIBKVjHEyoVyY5Ds0zZsAgmW+Tn/dDdmx8+ObyXI5ynDvqD//PPCRbYK 4hog==
X-Gm-Message-State: AKwxytcSgpQ/RM6cYH685XvIZbvx5Vj7++QleneeglGa2aImZikI3OrK bwGPuiWxC8c8xUKtY/jm26o=
X-Google-Smtp-Source: AH8x224tAC3a8RSLkzJ9FV7KUGFkHxIWo2r08py/VV9LfmLZIaQYD7ixSvakyhuX0GYs4mRXxh66Kg==
X-Received: by 10.36.41.72 with SMTP id p69mr9927737itp.47.1516819776275; Wed, 24 Jan 2018 10:49:36 -0800 (PST)
Received: from mahesh-m-m8d1.attlocal.net ([2600:1700:edb0:8fd0:f531:c9be:3b67:558d]) by smtp.gmail.com with ESMTPSA id o8sm508994ioe.56.2018.01.24.10.49.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jan 2018 10:49:35 -0800 (PST)
From: Mahesh Jethanandani <mjethanandani@gmail.com>
Message-Id: <E5618F14-46C8-40BB-9116-9E4A866575BC@gmail.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_5CA372AC-8267-4DA4-BF71-F13AEC785EE4"
Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\))
Date: Wed, 24 Jan 2018 10:49:33 -0800
In-Reply-To: <283f5774-5995-6ae3-16b7-385b8ea270d1@cisco.com>
Cc: Andy Bierman <andy@yumaworks.com>, Ebben Aries <exa@juniper.net>, "Reshad Rahman (rrahman)" <rrahman@cisco.com>, "yang-doctors@ietf.org" <yang-doctors@ietf.org>
To: Benoit Claise <bclaise@cisco.com>
References: <9E242E7E-E87D-41C7-BFED-EB8185195F26@cisco.com> <20180110.223316.2175524120457720164.mbj@tail-f.com> <20180110220131.xmsorl4gwixqv77s@smtp.juniper.net> <16188AE1-697A-47E4-817B-CB6D7CE6D0B9@cisco.com> <20180110222610.qgdknjrkxdw65jbk@smtp.juniper.net> <20180110223801.hx23svra4xpuww2i@elstar.local> <CABCOCHQEsHGETaKnfa7bBM955h1L28WqqcT72MSRm4xcoNW1pw@mail.gmail.com> <20180110232830.6rqbhpw5s55kx6zo@elstar.local> <29599bf2-f920-355c-8b3f-a7d696380e73@cisco.com> <20180116174323.e2b4zr5ffgrycnei@elstar.local> <1101aeba-67ad-f8df-b8d0-30109b915129@cisco.com> <283f5774-5995-6ae3-16b7-385b8ea270d1@cisco.com>
X-Mailer: Apple Mail (2.3445.5.20)
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/xkS-b6NVE9eBrCobYaqv-60B0Sw>
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: Wed, 24 Jan 2018 18:49:39 -0000

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://tools.ietf.org/html/draft-ietf-netmod-rfc6087bis-15#section-4.17 <https://tools.ietf.org/html/draft-ietf-netmod-rfc6087bis-15#section-4.17>, 
>>>> 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://www.ietf.org/mailman/listinfo/yang-doctors

Mahesh Jethanandani
mjethanandani@gmail.com