Re: [netmod] Fwd: New Version Notification for draft-ietf-netmod-yang-instance-file-format-01.txt

Robert Wilton <rwilton@cisco.com> Thu, 14 February 2019 11:12 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 5C7FC131160 for <netmod@ietfa.amsl.com>; Thu, 14 Feb 2019 03:12:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.5
X-Spam-Level:
X-Spam-Status: No, score=-14.5 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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, 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 drpBH7biiMnK for <netmod@ietfa.amsl.com>; Thu, 14 Feb 2019 03:12:27 -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 7561A131060 for <netmod@ietf.org>; Thu, 14 Feb 2019 03:12:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=29555; q=dns/txt; s=iport; t=1550142746; x=1551352346; h=subject:to:references:from:message-id:date:mime-version: in-reply-to; bh=PLu3YKrJ3O0yUW3UTYq+HVHXANAdndDx4nDjSzEcRYE=; b=CjhNfR07N2a9+E/ihwwYbjncQdNaA6IPowoxKM/goAqdcyQidiSeI7eE U/dm8/fTdDWIqM3sl6xM1v/MTqGHIqyVLjeUk8/5oITXAWGjBQk79lK3n MNrscqYw91AKgrSxdyRHC74bhY7wby55tHum56QBYJ1nJBVJeCSaWwZxQ o=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AEAAAITGVc/xbLJq0YAUAKGgEBAQE?= =?us-ascii?q?BAgEBAQEHAgEBAQGBUQUBAQEBCwEBgVOBFXESJ4QGiBpfjHolfJcXFIFnDRg?= =?us-ascii?q?BDIQBRgKEAjQJDQEDAQECAQECbRwMhUoBAQEDAQEBIUsJEgkCEQECAQIBIAo?= =?us-ascii?q?CAiciBggGAQwGAgEBF4MFAYFqCA+LSYIlm2GBLx+EFAIOQUCEdYV6hmGBQD+?= =?us-ascii?q?BEScMgio1gx4BAQIBARaBFAEHCwEJNoJpgjUiAolhIAsCBYYtkm4JhnZEixQ?= =?us-ascii?q?GGYFuVoR+gxgmhF2DFoo6gQ+ENIUuhyeBRjhlcTMaCBsVGiGCbAmCHxcTiEy?= =?us-ascii?q?FPz8DMAGMc4I+AQE?=
X-IronPort-AV: E=Sophos; i="5.58,368,1544486400"; d="scan'208,217"; a="10032067"
Received: from aer-iport-nat.cisco.com (HELO aer-core-3.cisco.com) ([173.38.203.22]) by aer-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2019 11:12:23 +0000
Received: from [10.63.23.84] (dhcp-ensft1-uk-vla370-10-63-23-84.cisco.com [10.63.23.84]) by aer-core-3.cisco.com (8.15.2/8.15.2) with ESMTP id x1EBCMQZ011728; Thu, 14 Feb 2019 11:12:23 GMT
To: =?UTF-8?Q?Bal=c3=a1zs_Lengyel?= <balazs.lengyel@ericsson.com>, "netmod@ietf.org" <netmod@ietf.org>
References: <154409113299.3479.15867089668746650774.idtracker@ietfa.amsl.com> <35a31eae-9a4f-7d20-a9d3-6b0b60ac8a34@ericsson.com> <c546ebd8-fa9c-2694-f9d1-a03ea4842543@cisco.com> <5d82fbf6-6c6a-3bc8-8dbb-06503ff95dab@ericsson.com>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <f6f269ca-e9e3-1057-ede0-315ae594b8dd@cisco.com>
Date: Thu, 14 Feb 2019 11:12:22 +0000
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0
MIME-Version: 1.0
In-Reply-To: <5d82fbf6-6c6a-3bc8-8dbb-06503ff95dab@ericsson.com>
Content-Type: multipart/alternative; boundary="------------7AEDD7A835E59060E694D5AD"
Content-Language: en-US
X-Outbound-SMTP-Client: 10.63.23.84, dhcp-ensft1-uk-vla370-10-63-23-84.cisco.com
X-Outbound-Node: aer-core-3.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/mNt7tsnQ57agJQOrN5ZGN-dq5tY>
Subject: Re: [netmod] Fwd: New Version Notification for draft-ietf-netmod-yang-instance-file-format-01.txt
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, 14 Feb 2019 11:12:30 -0000

Hi Balazs,

I think that every instance data document logically has a YANG schema 
associated with it (i.e. a set of YANG modules, deviations, and enabled 
features).

YANG library defines this schema on a per datastore basis, along with 
other information.

My YANG packages is another attempt to construct these schema in a 
hierarchical way.

Directly embedding the necessary information to facilitate a client 
reading the YANG instance data also makes sense.


Please see inline ...

On 14/02/2019 10:23, Balázs Lengyel wrote:
>
>
> On 2019. 02. 07. 13:10, Robert Wilton wrote:
>>
>> Hi Balazs,
>>
>> Regarding identifying the instance data using a YANG package.
>>
>> If the YANG packages work is liked by the WG and progresses, then it 
>> seems plausible that a YANG package could become a better way of 
>> identifying the set of modules rather than using YANG library for a 
>> couple of reasons:
>>  1) It will allow modules to be identified via semantic version 
>> rather than just revision date.  This will likely be more meaningful 
>> to readers.
>>
> BALAZS: The nice thing about using yang-library is that when the 
> semver work augment the library with the module-version it will be 
> available for instance-data for free.

RW:

This only works if the reference to the schema includes the semver 
augmentation.  Your current approach of 
"ietf-yang-library@\d{4}-\d{2}-\d{2}\.yang';" doesn't allow this, unless 
the semver work produces a new version of YANG library rather than an 
augmentation.

I have no opposition to YANG library being one of the mechanisms to 
construct the schema, but I think that it should also be possible to 
define the schema inline, or use YANG packages (in future).


>>  2) It allows for a much more concise definition.  Rather than having 
>> to try and infer what schema a particular set of YANG modules related 
>> to from the list of modules, it can instead refer to a single package 
>> definition and version number.
>>
> BALAZS: Using packages would be more, concise however in some cases 
> you might not want to declare a package. E.g. we use a modular 
> architecture where one design group might be responsible for only one 
> YANG module (YAM). They need to deliver some instance-data related to 
> that YAM, but they don't want to declare a package that contains just 
> one YAM. Also some modules are packaged in so many ways that it is 
> easier to define their instance data just for that module. So while 
> packages are an interesting idea they will never completely replace 
> the module level, hence we need a module level solution too. One 
> packages are agreed, I will be happy to expand this specification.

RW:

But if I understand your approach correctly then to handle this case the 
instance data would need to reference a separate instance data file that 
uses YANG library to define the one YANG module that is uses.

If the schema is just a single YANG module then I think that it would be 
better to define that schema inline in the instance data document, and 
avoid the redirection.  Perhaps to keep it simple we restrict the list 
of YANG modules that can be used to define to define the schema inline 
to state that sub-modules cannot be used, and all features are assumed 
to be enabled.  If either of these conditions are not met then an 
external schema definition must be used.


>>  3) YANG library (certainly RFC7895bis) defines the schema in terms 
>> of the datastore, so if this version of YANG library is being used 
>> then it is a bit more confusing as to which datastore is being 
>> referred to.  I appreciate that there is a datastore leaf in the 
>> instance data that can help mitigate this.
>>
>> I also note that the draft currently binds that the only allowed 
>> inline schema is YANG library, but that seems somewhat overly 
>> restrictive, and perhaps this could be loosened to a leaf-list of 
>> inline module@revision definitions?
>>
> BALAZS: IMHO ietf-yang-library contains ll the data we need in a well 
> defined format (and some we don't always need). So why define a new 
> format when we already have one. Also by using YANG library we get for 
> free any new data in it e.g.module-version. We also need the info 
> about leafs and deviations.

RW:

Because YANG library isn't really the right format, and the goal of YANG 
library isn't to define this instance data file, but actually to define 
the capabilities of a server.

E.g. RFC 7895bis contains the information on how to build multiple 
datastore schema rather than just one.  So, if 7895bis is being used to 
construct a schema, then you also need to identify which datastore in 
YANG library represents the schema associated with the instance data.

I also don't think that you get augmentations from free.  How would a 
client know which augmentations to YANG library are being used unless 
that is defined somewhere?


>> I also appreciate that you don't want to delay the instance data 
>> draft for YANG packages, bit I wonder whether the draft can easily 
>> facilitate using a YANG package definition in future if required.
>>
> BALAZS: As I agree with your comment about choice (see below) that a 
> package reference can be easily included in that.
>>
>> Hence, rather than using a union for the "target pointer", I wonder 
>> whether it wouldn't be better to use a choice statement instead.
>>
>> E.g. the choice statement could be something like this:
>>
>>  choice "schema"
>>    leaf-list inline {
>>      type string {
>>        pattern '\w+@\d{4}-\d{2}-\d{2}\.yang'yang';
>>      }
>>    }
>>    leaf yang-library-ref { type uri } // Points to a instance data 
>> document YANG library content.
>>  }
>>
>> In future, the package draft could then augment (or update the 
>> revision) with something like this :
>>
>>    container package-ref {
>>      leaf "name" { type string; }
>>      leaf "version" { type yang-semver; }
>>      leaf-list "url" { type uri; }// Points to a instance data 
>> document containing YANG package content.
>>    }
>>
> BALAZS: OK, choice maybe a better choice because it is easier to 
> extend and because it explicitly states the method used. So how about:
>
>   choice "target-specification"
>     leaf inline {
>       type string { pattern 'ietf-yang-library@\d{4}-\d{2}-\d{2}\.yang'yang'; }   // I still want to use the library
>     }
>     leaf yang-library-ref { type uri }
>   }

RW:

I still think that binding "inline" to YANG library is too restrictive.  
This effectively means that there is a version of instance data 
documents that the only thing that they can contain is YANG library 
information (without augmentation).

Thanks,
Rob


>
> Later we can augment this choice with container package-ref.
>
>> Thanks,
>> Rob
>>
>> On 06/12/2018 10:15, Balázs Lengyel wrote:
>>>
>>> Hello,
>>>
>>> We uploaded a new version of the instance data draft. We tried to 
>>> address all comments and also to rework the format chapter to make 
>>> it easier to read. We omitted 2 comments:
>>>
>>> Rob commented that YANG packages could be used for defining the 
>>> target modules for instance data: I would like to avoid that because:
>>>
>>>   * Packages are not defined for YANG. Currently they are not part
>>>     of the versioning solution even though they were discussed and
>>>     are generally a good idea.
>>>   * IMHO as deviations/features are set on module level, just
>>>     specifying packages would not be enough. If we start using
>>>     package+module level deviations/features we may end up with a
>>>     more complicated hybrid solution.
>>>   * Module level YANG target definitions as described in the draft
>>>     are simple and need no new design
>>>
>>> Jürgen stated that it would be better to use the YANG XML/JSON 
>>> encoding as a format instead of referencing the get 
>>> operation/request. I might even agree with him, but for 2 reasons I 
>>> did not follow his idea:
>>>
>>>   * Currently there is no RFC I could reference either for XML or
>>>     JSON. AFAIK even RFC7951 does not define how multiple modules
>>>     should be encoded side by side.
>>>   * It is not the job of the instance data draft to dictate how to
>>>     encode YANG data generally e.g. on the wire.
>>>   * The contents of the get operation/request are well defined
>>>
>>> regards Balazs
>>>
>>>
>>>
>>> -------- Forwarded Message --------
>>> Subject: 	New Version Notification for 
>>> draft-ietf-netmod-yang-instance-file-format-01.txt
>>> Date: 	Thu, 6 Dec 2018 02:12:12 -0800
>>> From: 	internet-drafts@ietf.org
>>> To: 	Benoit Claise <bclaise@cisco.com>om>, Balazs Lengyel 
>>> <balazs.lengyel@ericsson.com>
>>>
>>>
>>>
>>>
>>> A new version of I-D, draft-ietf-netmod-yang-instance-file-format-01.txt
>>> has been successfully submitted by Balazs Lengyel and posted to the
>>> IETF repository.
>>>
>>> Name: draft-ietf-netmod-yang-instance-file-format
>>> Revision: 01
>>> Title: YANG Instance Data File Format
>>> Document date: 2018-12-06
>>> Group: netmod
>>> Pages: 21
>>> URL: 
>>> https://www.ietf.org/internet-drafts/draft-ietf-netmod-yang-instance-file-format-01.txt
>>> Status: 
>>> https://datatracker.ietf.org/doc/draft-ietf-netmod-yang-instance-file-format/
>>> Htmlized: 
>>> https://tools.ietf.org/html/draft-ietf-netmod-yang-instance-file-format-01
>>> Htmlized: 
>>> https://datatracker.ietf.org/doc/html/draft-ietf-netmod-yang-instance-file-format
>>> Diff: 
>>> https://www.ietf.org/rfcdiff?url2=draft-ietf-netmod-yang-instance-file-format-01
>>>
>>> Abstract:
>>> There is a need to document data defined in YANG models when a live
>>> YANG server is not available. Data is often needed already in design
>>> time or needed by groups that do not have a live running YANG server
>>> available. This document specifies a standard file format for YANG
>>> instance data, which follows the syntax and semantic from existing
>>> YANG models, re-using existing formats from <get> operation/request
>>> and decorates them with metadata.
>>>
>>>
>>>
>>> Please note that it may take a couple of minutes from the time of 
>>> submission
>>> until the htmlized version and diff are available at tools.ietf.org.
>>>
>>> The IETF Secretariat
>>>
>>> -- 
>>> Balazs Lengyel                       Ericsson Hungary Ltd.
>>> Senior Specialist
>>> Mobile: +36-70-330-7909              email:Balazs.Lengyel@ericsson.com  
>>>
>>> _______________________________________________
>>> netmod mailing list
>>> netmod@ietf.org
>>> https://www.ietf.org/mailman/listinfo/netmod
> -- 
> Balazs Lengyel                       Ericsson Hungary Ltd.
> Senior Specialist
> Mobile: +36-70-330-7909              email:Balazs.Lengyel@ericsson.com