Re: [netmod] initial comments on draft-rwilton-netmod-yang-packages

Robert Wilton <rwilton@cisco.com> Thu, 24 January 2019 18:16 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 4EFF4131304 for <netmod@ietfa.amsl.com>; Thu, 24 Jan 2019 10:16:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -19.042
X-Spam-Level:
X-Spam-Status: No, score=-19.042 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01, URIBL_BLOCKED=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 k3M6Yscxrbod for <netmod@ietfa.amsl.com>; Thu, 24 Jan 2019 10:16:25 -0800 (PST)
Received: from aer-iport-1.cisco.com (aer-iport-1.cisco.com [173.38.203.51]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F013A1312EA for <netmod@ietf.org>; Thu, 24 Jan 2019 10:16:24 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=31147; q=dns/txt; s=iport; t=1548353785; x=1549563385; h=subject:to:references:from:message-id:date:mime-version: in-reply-to; bh=LNKIP7T5O504cb0+F0+1HgL6PW/3O300xWXPo8xxo1c=; b=gAtMzQe1T2/PnJtUxcO3ldc5WyzMw6/NzKy8krZtBC+3Ne3nVlMeK1xH Qowv1j8dBBJWY9y+Ebisdc5qhhkIZrQexCqeJha+F4tod6xAgci7nRwd/ o5QmoJMnmVQwNDmBdxMZk2hFaadF8V74HO/nv7LIOvExQIrmD5gPTyzLT 8=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0AHAADv/Ulc/xbLJq0ZAUoaAQEBAQECAQEBAQcCAQEBAYFSBAEBAQELAQGBDIFdcRInhAGIeYx0CCWYB4F7DSOESQKDJTUIDQEDAQECAQECbRwMhUoBAQEBAgEjCkUMCwkCEQQBAQEgAQkCAk8IBgEMBgIBAReDBwGBeQgPjyGBQZthgS8fhCNBQIRmBYxYgUA/gTgMgWF+gx4CAwGBNxCDH4JXAolGUIV5hlmKaVwJhyqKdgYYii2HcooMhSOEc4cVgUgCNCiBLjMaCBsVO4Jsix2FPz8DMIhigkwBAQ
X-IronPort-AV: E=Sophos;i="5.56,517,1539648000"; d="scan'208,217";a="9649814"
Received: from aer-iport-nat.cisco.com (HELO aer-core-4.cisco.com) ([173.38.203.22]) by aer-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jan 2019 18:16:22 +0000
Received: from [10.63.23.64] (dhcp-ensft1-uk-vla370-10-63-23-64.cisco.com [10.63.23.64]) by aer-core-4.cisco.com (8.15.2/8.15.2) with ESMTP id x0OIGMvu012273; Thu, 24 Jan 2019 18:16:22 GMT
To: "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com>, "netmod@ietf.org" <netmod@ietf.org>
References: <DB7PR07MB397887BD6B69B474618FD1469B9A0@DB7PR07MB3978.eurprd07.prod.outlook.com>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <98469d28-4d53-c5c5-6487-a873a289e073@cisco.com>
Date: Thu, 24 Jan 2019 18:16:21 +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: <DB7PR07MB397887BD6B69B474618FD1469B9A0@DB7PR07MB3978.eurprd07.prod.outlook.com>
Content-Type: multipart/alternative; boundary="------------8A2BDE503AED88F64D6E2AC0"
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-4.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/lNFp_rXpz5lmQN2VnWQk8S1dtsQ>
Subject: Re: [netmod] initial comments on draft-rwilton-netmod-yang-packages
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, 24 Jan 2019 18:16:29 -0000

Hi Jason,

Thanks for the review and comments.

I've put some responses inline ...

On 24/01/2019 14:56, Sterne, Jason (Nokia - CA/Ottawa) wrote:
>
> Hi guys,
>
> I've gotten most of the way through the draft and have some initial 
> comments. I haven't digested the section 10 open issues yet or the 
> examples.
>
> Section 5 mentions the following:
>
>    YANG library is augmented to allow servers to report the packages
>
>    that they implement and to associate those packages back to
>
> particular datastore schema.
>
> Does the combination of this draft and rfc7895bis somehow allow the 
> same package to be advertised in 2 different datastores, but with 
> different deviations in each datastore? I'm thinking of a case, for 
> example, where a package is fully supported in the running but the 
> package minus a few modules (or parts of modules) is supported in the 
> operational datastore. There seems to be a 1:1 relationship between 
> package and rfc7895bis schema.
>
So, the intention is no, not directly.

My aim here is that <running> would implement package "foo", and 
<operational> would implement package "modified-foo".  Package 
"modified-foo" would import package "foo" and also specify the set of 
modules that contain the deviations "foo".

I didn't want a server to be able to see that I implement package "foo", 
but then I have all these deviations that change its behavior.  Instead, 
it is really implementing a different package that is based on "foo".


> The packages draft doesn't include any specific leaf-list for 
> deviations. Section 7.2 mentions that deviations could be expressed by 
> including modules that happen to contain deviations. That seems a bit 
> inconsistent with rfc7895bis that has a specific leaf-list of 
> deviations (and NETCONF hello that specifically explicitly labels 
> deviation modules).
>
I'm conflicted on this one.  I don't really like the deviation list in 
YANG library because I regard it as a duplicate source of information, 
and then there is a question of which source of data do you trust.  E.g. 
do you process a deviation in a module that is not listed in the 
deviations module list?


> Section 5.1 says the package must be referentially complete. I can see 
> the advantages of that although wondering if that might limit 
> flexibility of partitioning modules into packages. I could imagine use 
> cases for dividing a large set of modules into a few packages that 
> might rev independently but can still all work together (especially if 
> they rev in a bc manner). But maybe that just starts to introduce too 
> much complexity?
>
Yes, having partial packages may be useful.  Perhaps just adding a leaf 
to indicate whether a package is referentially complete could be the 
answer here.


> I didn't understand this part of section 5.1. Can you maybe illustrate 
> with an example?
>
> The version/revision of a module listed in the package module list
>
> supercedes any version/revision of the module listed in a imported
>
> package module list.  This allows a package to resolve any
>
> conflicting implemented module versions/revisions in imported
>
> packages.
>
Probably best to see example B.3. in the appendix because it exactly 
illustrates this point.

Basically:
1) Packages must explicitly list all versions of all modules they 
define/import.
2) If two imported packages define different versions of modules, then 
the package that is importing them needs a way to define which version 
to use.
3) A package needs a way to override the version of module specified in 
an imported package.


> It might be a good idea to add a parent-version to the package module 
> (to allow tracking lineage of packages).
>
Agreed, or maybe allowing a revision history like modules.  Not sure 
which is better here.  Packages could get a lot of updates, and a long 
revision history would not be helpful at all.


> I like the use of groupings. That allows a manager to use this as a 
> building block to compose a model that has a list of packages.
>
OK.


> Having a global list of mandatory features (vs having the mandatory 
> feature a per-module list) means inventing the new 
> <module-name>:<feature> format. Should we instead somehow put the 
> mandatory features against each module of the package?
>
Perhaps.  My thinking here was to have the list of features high up and 
very easy to find/parse.


> The location leaf is a uri but then the description says it must be a 
> url (where the model can be retrieved). I do like that the namespace 
> is separate from the location, but maybe we should make location a url 
> type?
>
Yes, I was thinking that is should be a URL.


> Do we need a namespace for package names in the model?
>
I had them in an earlier version, but I took them out, because I wasn't 
sure that they are really useful/required.

Defining a format to make package names themselves globally unique might 
be sufficient.


> In 7.3 we only reference module-sets and not modules. So the grouping 
> of modules into sets and packages must be the same?
>
Not necessarily.

I am trying to reuse the module-set definitions as much as possible (to 
avoid duplication).  One issue here is that module-sets are combined 
then all the modules must not overlap, which doesn't make the mapping to 
module-sets quite so clean.


> A schema can only have a single package. I think that works but it 
> means a server would advertise multiple schemas if it wants to support 
> multiple packages. I'm not sure if there are some downsides to that 
> (it just surprised me).
>
My aim here was:
  - multiple packages are advertised in yang-library/packages
  - datastores only report that they "implement" one [top level] package 
version.  [The package itself might import other packages.]

If we do package selection, then for a given YANG client session, and 
the version of YANG library available/reported by that session, it would 
appear as if the server only implements one top level package for a 
datastore.  Different clients choosing different versions would see 
slightly different output depending on which package version they had 
selected to use.

Thanks again for the review and the comments!

Rob



> Jason
>
> *From:*netmod <netmod-bounces@ietf.org> *On Behalf Of *Robert Wilton
> *Sent:* Thursday, December 20, 2018 12:45 PM
> *To:* netmod@ietf.org
> *Subject:* [netmod] YANG Packages
>
> Hi,
>
> I've written up an ID for a potential solution for YANG packages using 
> instance data:
>
> Abstract
>    This document defines YANG packages, an organizational structure
>    holding a set of related YANG modules, that can be used to simplify
>    the conformance and sharing of YANG schema.  It describes how YANG
>    instance data documents are used to define YANG packages, and how the
>    YANG library information published by a server can be augmented with
>    additional packaging related information.
>
> https://datatracker.ietf.org/doc/draft-rwilton-netmod-yang-packages/
>
> Potentially this work may be of use as part of the YANG versioning 
> design team work.  In addition, if the WG likes this approach of 
> defining YANG packages, then it might also be useful to bind a schema 
> to a YANG instance data document.
>
> Some questions for members of the WG:
>
> 1) Do members of the WG agree that YANG packages is something that 
> needs to be solved?
>
> 2) Is the approach in this draft of defining these as instance data 
> documents a good starting point?
>
> 3) This approach augments YANG library-bis, reusing module-sets, but 
> not replacing the way that modules are reported in YANG library-bis.  
> Is this the right approach? This approach tries to allow module-sets 
> to be reused for both schema and packages, but the YANG library-bis 
> rules for combining module-sets (i.e. no conflicts) may make this 
> harder to really reuse the module-sets for both purposes.
>
> Of course, any other comments or feedback is welcome and appreciated.
>
> Thanks,
> Rob
>