Re: [netmod] features in import
Robert Wilton <rwilton@cisco.com> Thu, 31 January 2019 10:23 UTC
Return-Path: <rwilton@cisco.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 C860E130EDD for <netmod@ietfa.amsl.com>; Thu, 31 Jan 2019 02:23:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -19.054
X-Spam-Level:
X-Spam-Status: No, score=-19.054 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-4.553, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.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 S_T91a74uRGM for <netmod@ietfa.amsl.com>; Thu, 31 Jan 2019 02:23:33 -0800 (PST)
Received: from aer-iport-3.cisco.com (aer-iport-3.cisco.com [173.38.203.53]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 29B2D131045 for <netmod@ietf.org>; Thu, 31 Jan 2019 02:23:31 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=4379; q=dns/txt; s=iport; t=1548930212; x=1550139812; h=subject:to:references:from:message-id:date:mime-version: in-reply-to:content-transfer-encoding; bh=i+zK6eVmdhjyFgZ7eenc5rayngEA8EbMZ9syY1Y2ih0=; b=akPAVQHP4G0hAKPsx3oZLtVwuovARvwRBLusCDaLI8vDv4voawLBPi1x c0vQupd41rWlXuz+3b+TnLTqCgua1yg/jmuv/4D/e+MxgXE4Dw8FoZd0K RvVxxykWTSAdexwTsu8W+MVvugMt4iO3/smXrQRJFPKbdVxcBkua8O2aG E=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0BZAAA7y1Jc/xbLJq1jGgEBAQEBAgEBAQEHAgEBAQGBZYJrUAEgEieEA4h5jHQtmgkNGAuEA0YCgy84EgEDAQECAQECbRwMhUsBAQEDAQEhFTYbCw4KAgImAgInMAYBDAYCAQGDHgGCAQ+sU4EvhUOEagWBC4tMgUA/gTiCa4MeAQGBS4MfglcCkHCRFVwJiw+HIAYZij6HfoofijiHHYFdIYFWMxoIGxU7gmyCJhiIX4U/PwMwkA0BAQ
X-IronPort-AV: E=Sophos;i="5.56,543,1539648000"; d="scan'208";a="9722785"
Received: from aer-iport-nat.cisco.com (HELO aer-core-2.cisco.com) ([173.38.203.22]) by aer-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jan 2019 10:23:30 +0000
Received: from [10.63.23.64] (dhcp-ensft1-uk-vla370-10-63-23-64.cisco.com [10.63.23.64]) by aer-core-2.cisco.com (8.15.2/8.15.2) with ESMTP id x0VANTc2016074; Thu, 31 Jan 2019 10:23:29 GMT
To: Martin Bjorklund <mbj@tail-f.com>, andy@yumaworks.com, netmod@ietf.org
References: <874l9qjhto.fsf@nic.cz> <20190130.200250.2298112466859908310.mbj@tail-f.com> <CABCOCHRTOY_W6Z3Sc7ejm0j=vEdAE221wLveH8w04ekHQnc4Zw@mail.gmail.com> <20190131.094407.267764793396247491.mbj@tail-f.com>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <a26ec31e-9c0c-ba58-9e9e-8f1cbf0aa451@cisco.com>
Date: Thu, 31 Jan 2019 10:23:29 +0000
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0
MIME-Version: 1.0
In-Reply-To: <20190131.094407.267764793396247491.mbj@tail-f.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Content-Language: en-US
X-Outbound-SMTP-Client: 10.63.23.64, dhcp-ensft1-uk-vla370-10-63-23-64.cisco.com
X-Outbound-Node: aer-core-2.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/t4dIwA7mYPDeDfEGJ_bDYx0FqQA>
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: Thu, 31 Jan 2019 10:23:36 -0000
Hi Martin, Andy, Despite what YANG the language allows, I think that it is much cleaner use of the language to split types/groupings that are expected to be shared by other modules into separate "*_types.yang" modules. I agree with Andy that it is strange to support a feature in a module that is not itself implemented. My hope with YANG library-bis is that most implementations can get by with an empty "import-only-modules" list, and that they can define all modules (including types only modules) in the "module" list of implemented modules. So, I actually think that the workaround using deviations below is OK, because this scenario should be avoidable by having a clean separation between external reusable types and implementable nodes. Thanks, Rob On 31/01/2019 08:44, Martin Bjorklund wrote: > Andy Bierman <andy@yumaworks.com> wrote: >> Hi, >> >> I do not agree these changes should be made at this late date. >> It seems to me that in order to support a feature you have to implement it, >> and therefore if any features are set then the module is implemented, not >> imported. > But this is not what RFC 7950 says about implement: > > A server implements a module if it implements the module's data > nodes, RPCs, actions, notifications, and deviations. > >> All features should be set to false in an import-only module. >> >> IMO this interpretation holds for typedef modules like iana-crypt-hash. >> We list that as implemented (because it is) and the features that are >> supported are set. > If a module consists only of typedefs, there is no problem. > Conformance "import" or "import-only" modules exist in YL b/c modules > may have a mix of typedefs and data nodes etc. > > So in the case that Lada brought up, a server would have to list the > module as implemented with a certain set of features; and then also > deviate all nodes/rpc/notifc etc as 'not-implemented'. > > > /martin > >> >> Andy >> >> On Wed, Jan 30, 2019 at 11:03 AM Martin Bjorklund <mbj@tail-f.com> wrote: >> >>> 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 >>> >>> _______________________________________________ >>> netmod mailing list >>> netmod@ietf.org >>> https://www.ietf.org/mailman/listinfo/netmod >>> > _______________________________________________ > netmod mailing list > netmod@ietf.org > https://www.ietf.org/mailman/listinfo/netmod > . >
- [netmod] features in import Ladislav Lhotka
- Re: [netmod] features in import Martin Bjorklund
- Re: [netmod] features in import Andy Bierman
- Re: [netmod] features in import Martin Bjorklund
- Re: [netmod] features in import Robert Wilton
- Re: [netmod] features in import Ladislav Lhotka
- Re: [netmod] features in import Andy Bierman
- Re: [netmod] features in import Martin Bjorklund
- Re: [netmod] features in import Robert Wilton
- Re: [netmod] features in import Robert Wilton
- Re: [netmod] features in import Andy Bierman