Re: [netmod] features in import

Martin Bjorklund <mbj@tail-f.com> Wed, 30 January 2019 19:02 UTC

Return-Path: <mbj@tail-f.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 6FF8E130F80 for <netmod@ietfa.amsl.com>; Wed, 30 Jan 2019 11:02:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, 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 CR5_MckqV2EC for <netmod@ietfa.amsl.com>; Wed, 30 Jan 2019 11:02:51 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id B9E94130EB2 for <netmod@ietf.org>; Wed, 30 Jan 2019 11:02:51 -0800 (PST)
Received: from localhost (h-4-215.A165.priv.bahnhof.se [158.174.4.215]) by mail.tail-f.com (Postfix) with ESMTPSA id 81E661AE012C; Wed, 30 Jan 2019 20:02:50 +0100 (CET)
Date: Wed, 30 Jan 2019 20:02:50 +0100
Message-Id: <20190130.200250.2298112466859908310.mbj@tail-f.com>
To: lhotka@nic.cz
Cc: netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <874l9qjhto.fsf@nic.cz>
References: <874l9qjhto.fsf@nic.cz>
X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/uCllPZGdLSpIDrYpaNsl_8DlZj0>
Subject: Re: [netmod] features in import
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
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: Wed, 30 Jan 2019 19:02:53 -0000

Hi,

Ladislav Lhotka <lhotka@nic.cz> wrote:
> Hi,
> 
> unlike RFC 7895, 7895bis doesn't provide the "feature" leaf list for
> import-only modules. But is it really so that features have no use in
> such modules?
> 
> For example, an enum can depend on a feature, and if it is inside a
> typedef, it can also be in an import-only module. What if that feature
> is defined in the same module?

I think you're right, and that this is an unfortunate omission.

The fix is simple though; we would have to add the leaf-list features
to import-only.  Probably refactor the "feature" leaf-list into a
grouping so it works like the grouping location-leaf-list:

  grouping feature-leaf-list {
    leaf-list feature {
      type yang:yang-identifier;
      description
        "List of all YANG feature names from this module that are
         supported by the server, regardless whether they are defined
         in the module or any included submodule.";
    }
  }

And then "uses feature-leaf-list":

OLD:

  grouping module-implementation-parameters {
    description
      "Parameters for describing the implementation of a module.";

    leaf-list feature {
      type yang:yang-identifier;
      description
        "List of all YANG feature names from this module that are
         supported by the server, regardless whether they are defined
         in the module or any included submodule.";
    }

NEW:

  grouping module-implementation-parameters {
    description
      "Parameters for describing the implementation of a module.";

    uses feature-leaf-list;


And in the list "import-only":

OLD:

      uses location-leaf-list;

      uses feature-leaf-list;



/martin