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

Martin Björklund <mbj+ietf@4668.se> Thu, 19 May 2022 07:05 UTC

Return-Path: <mbj+ietf@4668.se>
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 408E6C14F73A for <netmod@ietfa.amsl.com>; Thu, 19 May 2022 00:05:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=4668.se header.b=A3vIxzCU; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=GMBBE3Uw
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 xvzp9ZIUC97P for <netmod@ietfa.amsl.com>; Thu, 19 May 2022 00:05:01 -0700 (PDT)
Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3C7BAC14F6EC for <netmod@ietf.org>; Thu, 19 May 2022 00:04:54 -0700 (PDT)
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id AB2335C01BF; Thu, 19 May 2022 03:04:53 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 19 May 2022 03:04:53 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=4668.se; h=cc:cc :content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1652943893; x= 1653030293; bh=0KDrdghYR6G69tQG/6r/5GzNVLgqX/Rpi9ssVvYAYbI=; b=A 3vIxzCUrVFnJDc2bI15a6s/HfpNuH+4HuP+OWosbBtpy4Hes7ItDb8VAjL/wJkV2 MUGRR7Lqpfy81DUs8PGhuBNIYSWfBuL8tttbs/QJ2HLhm0JocUlnbylWEi1BtMg9 fiLm7TMF/yOK+9OPblh/z12x/3axCuKIGa2HGzEvn1sLUN8XuZtGMK8XRSA4WVx0 UQuQrFqw+Jun81ewYAfbHAmRz0F0uvFeub5k2kNP0l9/kxSPb2fEgxuftMsQG3Vf kuHVkg1XK8Ye27328dUl+1o/6lXfZHaPEyU4wBX/tfR95kduxL+CHdwAaAxvYtzX SVjTo5sT07Xh7euvhyWvA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1652943893; x= 1653030293; bh=0KDrdghYR6G69tQG/6r/5GzNVLgqX/Rpi9ssVvYAYbI=; b=G MBBE3UwrB8PypgDOpwOl0EYxTSGqiVk/Q4MGIptCAddHiXuKKl0QqFK+gyXDE/jw er2grJ9i461VegIoPfSnGE5feWxQCivabCSmONz6cFQk5vHhcagohPgUPh7AaRP8 mQJco7QcLcxESKr0/2Lq3kRbaNfgFMrTwMOSe8M1/7rvt+i2ecMLAKyFXGntn2Ym 26T+Td7W06RydUKF/d87Jeb/pbiG9uJ+EXPRIJc7//WfORkwTbMjbTyHpMxQmGTs 9J6TvFvbghI5rv++O8Qdo8MU742eZJBi6TdgPG+/d+9jx9viDPeKYI388nDhFo+r XPDDF7gsM44HnwKmnhK/g==
X-ME-Sender: <xms:FeyFYg9tV3bcaJdbUMtToHtQG4Wi2igexKIPK0JbWVfWU4ynssxn-g> <xme:FeyFYosF_8IUPqQFiHfkM-3sPHpCWGwLoS-aUec-YuWydgJ1jj_vwP10Uq0BzJU1n vD6jSuj8GN3i4eNJf8>
X-ME-Received: <xmr:FeyFYmCWFMNUWN2IOSz6Yv159HnilCLU2OaiSKZM7HbeCOCmTKRFFZfbn8mIcu4JjxuSHSKS8DYU5a7kakjYLpkdak4jU2iaVQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedriedtgdduudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffkffvvefuhfgjfhfogggtgfesth hqredtredtudenucfhrhhomhepofgrrhhtihhnuceujhpnrhhklhhunhguuceomhgsjhdo ihgvthhfseegieeikedrshgvqeenucggtffrrghtthgvrhhnpedvudeuiedvkedvteduud eiieegudfgteegvedugfdtleeuffevhfffhefhhfegudenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmsghjodhivghtfhesgeeiieekrdhsvg
X-ME-Proxy: <xmx:FeyFYgezQbQNXUBrQYR9YlJzBZcR0iVF9udGds5vVbx82BdPixPSGA> <xmx:FeyFYlNIiR_pkR_FYVgMgtgPhZdC5mEBYrnXgez53c8stSqU9uEVBQ> <xmx:FeyFYqn52OuhwiAdmvwaB3GlwjABZiy-lhRCAmc6hazfa3V-K4Q5Dw> <xmx:FeyFYnUfOnO6I_gXCUykFCAPnxNfl2RzaBLEbfPM9mZwD2A-K5yuxw>
Feedback-ID: icc614784:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 19 May 2022 03:04:52 -0400 (EDT)
Date: Thu, 19 May 2022 09:04:52 +0200
Message-Id: <20220519.090452.636208001533389643.id@4668.se>
To: kent+ietf@watsen.net
Cc: netmod@ietf.org
From: Martin Björklund <mbj+ietf@4668.se>
In-Reply-To: <01000180d793d6ee-f82a4a03-28d8-4f8b-909e-7306a7fc565b-000000@email.amazonses.com>
References: <01000180a9eb37cb-85b9c576-c1eb-425a-b42c-b3cabe548fbb-000000@email.amazonses.com> <20220518.080543.825575420363032441.id@4668.se> <01000180d793d6ee-f82a4a03-28d8-4f8b-909e-7306a7fc565b-000000@email.amazonses.com>
X-Mailer: Mew version 6.8 on Emacs 26.3
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/netmod/_09no_Qxt_rxHMECyh0d8xVWh_E>
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: Thu, 19 May 2022 07:05:07 -0000

Kent Watsen <kent+ietf@watsen.net> wrote:
> 
> 
> > On May 18, 2022, at 2:05 AM, Martin Björklund <mbj+ietf@4668.se>
> > wrote:
> > 
> >> 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?
> 
> 
> Background:
> 
> The genesis of this issue arises from a change (I think!) in
> instance-document validation behavior from yanglint 1.x and 2.x, which
> I've been switching to, whereby validation is now failing due to an
> assumption that a module is *implemented* when the module is targeted
> by the "--features" parameter, even if only to explicitly indicate the
> *no* features are defined (i.e., "--featues=foo:", note that there are
> no feature-names listed after the colon).  As an aside, this seems a
> bit like "the tail wagging the dog", but the reasoning was/is that
> features can only be defined if a module is implemented and therefore
> it makes sense to auto-implement a module even though it wasn't
> explicitly listed as such on the command line.
> 
> Issue:
> 
> An issue arises when a module (like ietf-keystore) defines a grouping
> (like "keystore-grouping") that is used both to allow instances in
> other data models as well as a "global" instance when the module is
> implemented.  i.e., container keystore { uses keystore-grouping; }
> 
> In ietf-keystore, a feature (central-keystore-supported) is used to
> enable leafrefs to the global instance for cases when the module is
> implemented (e.g., see local-or-keystore-symmetric-key-grouping).
> However, because it was not anticipated that a module had to be
> implemented in order for a feature to be defined (as was allowed by
> RFC 7895 YANG Library), the "central-keystore-supported" feature
> statement was NOT placed on the root node of the protocol-accessible
> tree.
> 
> So, in the case of NOT wanting the global keystore instance and yet
> there IS a desire to define another keystore feature (e.g.,
> asymmetric-keys), it seems that 1) the module MUST be implemented
> *and* the root node of the protocol-accessible tree MUST have an
> "if-feature central-keystore-supported" statement.
> 
> Closing thoughts:
> 
> 1) I'm not saying it is wrong that a module must be implemented in
> order to define features defined in it.  But I am noting that I can't
> find where this behavior is defined (e.g., in RFC 7950).  Also I note
> that RFC 7895 enabled features to be defined independent of
> implementation-status while RFC 8525 doesn't.  As a co-author of RFC
> 8525, I don't recall this being discussed and wonder what
> justification was used, as folks are pointing to and working backwards
> from RFC 8525 to indicate that it must be so.

Hmm, I don't remember why this was changed in RFC 8525.  Perhaps this
was by accident?  The only text I can find is this in RFC 7950:

  5.6.5.  Implementing a Module

     A server implements a module if it implements the module's data
     nodes, RPCs, actions, notifications, and deviations.

Which seems to indicate that "implementing a module" is NOT required
for a feature to be supported.

> 2) If it is the case that the module must be implemented to use its
> features, then I need to update some of my modules (e.g., crypto-types
> and friends) to explicitly disable the protocol-accessible tree when
> the module is implemented *only* to use its features.

Since RFC 8525 doesn't allow a feature to be supported w/o also
implementing the module, I think this is the solution for now.  And it
is not wrong even if RFC 8525 was updated to support features from
imported modules.


> 3) I wish more modules would following the pattern of having the
> global protocol accessible tree be defined via a "uses" of a grouping
> defined in the module.  In another recent project, I had to hack the
> topology modules defined in RFC 8345 (to convert the containers to
> groupings) to enable a multiplicity of "abstract network topologies"
> to be configured.  The assumption that only a single global instance
> is ever needed is proving to be invalid in my work time and again.

This is a classic problem w/ any model... And you can extend it to
other things as well, not only top-level nodes; whenever you define a
leaf, perhaps someone could support multiple instances and wished it
was a leaf-list instead?  And in a leaf-list, perhaps someone wanted
to add additional properites to each item, and wished it was a list
instead?  And so on...


/martin