Re: [netmod] Does defining a feature require the module be implemented?

Kent Watsen <kent+ietf@watsen.net> Mon, 30 May 2022 12:49 UTC

Return-Path: <0100018115039cac-69f4a4f9-05a8-48e0-a50f-a3cb62bc9dcf-000000@amazonses.watsen.net>
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 A08E3C15C08D for <netmod@ietfa.amsl.com>; Mon, 30 May 2022 05:49:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.911
X-Spam-Level:
X-Spam-Status: No, score=-1.911 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=amazonses.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TyjTspbc9fjI for <netmod@ietfa.amsl.com>; Mon, 30 May 2022 05:49:29 -0700 (PDT)
Received: from a48-110.smtp-out.amazonses.com (a48-110.smtp-out.amazonses.com [54.240.48.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 10863C15C086 for <netmod@ietf.org>; Mon, 30 May 2022 05:49:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1653914967; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:Feedback-ID; bh=+R5GpLcNrrrwZ02MlpEvUKXLXICqJ45QVbQjduXYtaM=; b=mAXsU4V3/2Jz/5OQlLTJ9+AY+WF0IQFq5yB5vDJMZiDkUK0E8KFh8zJ06lSsfaW2 q7qot5BFM0uZOZDzkSMZtC2n9UNGeMDmNwxxo0B56e3FSRSPLGUZ3ExrBYxxqqarfQ9 dJAEgUqHCRLDcufn2DvC7thWiJ15eHNHTJQHP3E4=
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.60.0.1.1\))
From: Kent Watsen <kent+ietf@watsen.net>
In-Reply-To: <20220518.080543.825575420363032441.id@4668.se>
Date: Mon, 30 May 2022 12:49:27 +0000
Cc: "netmod@ietf.org" <netmod@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-ID: <0100018115039cac-69f4a4f9-05a8-48e0-a50f-a3cb62bc9dcf-000000@email.amazonses.com>
References: <01000180a9eb37cb-85b9c576-c1eb-425a-b42c-b3cabe548fbb-000000@email.amazonses.com> <20220518.080543.825575420363032441.id@4668.se>
To: Martin Björklund <mbj+ietf@4668.se>
X-Mailer: Apple Mail (2.3693.60.0.1.1)
Feedback-ID: 1.us-east-1.DKmIRZFhhsBhtmFMNikgwZUWVrODEw9qVcPhqJEI2DA=:AmazonSES
X-SES-Outgoing: 2022.05.30-54.240.48.110
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/JUSQAHcmtqcdT9rJIwRd0M2YMbI>
Subject: Re: [netmod] Does defining a feature require the module be implemented?
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.34
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, 30 May 2022 12:49:33 -0000

> Kent Watsen <kent+ietf@watsen.net> wrote:
>> YANG Doctors, 
>> 
>> 
>> Does "foo" need to be "implemented", in order for its feature to be
>> define?
>> 
>> 	module foo {
>> 	  yang-version 1.1;
>> 	  namespace "https://example.net/foo";
>> 	  prefix "f";
>> 
>> 	  feature foo-feature;
>> 
>>          ...
>> 	}
>> 
>> 
>> Specifically, using the previous YANG Library (RFC 7895), would this
>> be possible:
>> 
>>      {
>>        "name": "foo",
>>        "feature": [
>>          "foo-feature"
>>        ],
>>        "namespace": "https://example.net/foo",
>>        "conformance-type": "import"
>>      },
>> 
>> 
>> Or does "foo" also need to be "implemented", in order for its feature
>> to be defined?
>> 
>> 
>> PS: the answer to this impacts the "crypto-types and friends" drafts
>> in the NETCONF WG, where it is assumed (and various tools agreed, sans
>> a recent change in `yanglint`) that the implementation-status of a
>> module is orthogonal to what features supported.
> 
> Can you show a specific example where this is a problem?

The issue is that the modules need to be implemented, and thus any protocol-accessible nodes contained therein are enabled.   The issue was detected by an "imported" module containing a protocol-accessible leaf with "mandatory true".  Validation failed.  The fix was/is to define a special feature (e.g., protocol-accessible-nodes-supported) to put on the top-level nodes contained in the module.  This way the nodes aren't enabled simply because the module is implemented, as the feature must be defined as well.


> /martin

K.