Re: [netmod] comments on draft-ietf-netmod-yang-instance-file-format-04

Martin Bjorklund <mbj@tail-f.com> Mon, 18 November 2019 11:55 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 AD1721200E0 for <netmod@ietfa.amsl.com>; Mon, 18 Nov 2019 03:55:05 -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_HELO_NONE=0.001, SPF_PASS=-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 EvO1pMYjkYJG for <netmod@ietfa.amsl.com>; Mon, 18 Nov 2019 03:55:03 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 334BC120018 for <netmod@ietf.org>; Mon, 18 Nov 2019 03:55:03 -0800 (PST)
Received: from localhost (unknown [173.38.220.41]) by mail.tail-f.com (Postfix) with ESMTPSA id DBDE61AE0310; Mon, 18 Nov 2019 12:55:00 +0100 (CET)
Date: Mon, 18 Nov 2019 12:54:29 +0100 (CET)
Message-Id: <20191118.125429.1187631103383034310.mbj@tail-f.com>
To: balazs.lengyel@ericsson.com
Cc: andy@yumaworks.com, netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <AM7PR07MB6214D41C265D4AEEC63A0F7AF0720@AM7PR07MB6214.eurprd07.prod.outlook.com>
References: <AM7PR07MB6214B5582C8EA2CB2924DA05F0720@AM7PR07MB6214.eurprd07.prod.outlook.com> <20191117.175235.2089925675266198271.mbj@tail-f.com> <AM7PR07MB6214D41C265D4AEEC63A0F7AF0720@AM7PR07MB6214.eurprd07.prod.outlook.com>
X-Mailer: Mew version 6.8 on Emacs 25.2
Mime-Version: 1.0
Content-Type: Text/Plain; charset=utf-8
Content-Transfer-Encoding: base64
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/VXXvlH3uAEqGsI1lyoV7a7IdhuE>
Subject: Re: [netmod] comments on draft-ietf-netmod-yang-instance-file-format-04
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: Mon, 18 Nov 2019 11:55:06 -0000

Balázs Lengyel <balazs.lengyel@ericsson.com> wrote:
> 
> 
> -----Original Message-----
> From: Martin Bjorklund <mbj@tail-f.com> 
> Sent: 2019. november 18., hétfő 0:53
> To: Balázs Lengyel <balazs.lengyel@ericsson.com>
> Cc: andy@yumaworks.com; netmod@ietf.org
> Subject: Re: [netmod] comments on
> draft-ietf-netmod-yang-instance-file-format-04
> 
> > > On Thu, Oct 10, 2019 at 5:06 AM Martin Bjorklund <mbj@tail-f.com
> > > <mailto:mbj@tail-f.com> > wrote:
> > > 
> > > 
> > >   o  leaf-list module
> > > 
> > >     The type of this leaf-list is a string with:
> > > 
> > >       pattern '.+@\d{4}-\d{2}-\d{2}\.yang'yang';
> > > 
> > >     I think the revision needs to be optional, and the suffix ".yang"
> > >     dropped, since it doesn't add any value:
> > > 
> > >       pattern '.+(@\d{4}-\d{2}-\d{2})?';
> > > 
> > >    (same for inline-spec).
> > > 
> > >  
> > > 
> > > IMO the filespec SHOULD follow the pattern in
> > > https://tools.ietf.org/html/rfc7950#section-5.2
> > > 
> > > BALAZS: It does follow the pattern except that I made the revision
> > > date mandatory. It is needed to properly understand the instance data.
> > > 
> > >  
> > > 
> > > Except a new file extension SHOULD be used.
> > > 
> > > Suggest: .yif == YANG Instance File
> > > 
> > >  
> > > 
> > > Obviously it would be a horrible idea to use .yang since that 
> > > extension
> > > 
> > > is already used to identify a YANG schema file.
> > > 
> > > BALAZS: The leaf-list lists not the instance data files but the
> > > content defining YANG modules, so IMO “.yang” is an appropriate
> > > extension. It is really a YANG schema file we are listing.
> > 
> > No, you are not listing a file name, you are listing the name and,
> > optionally, the revision of a YANG *module*.  It can internally be
> > stored as a .yang file a .yin file, or as a blob in a database.
> > 
> > Hence, we should not have the ".yang" suffix here.
> > BALAZS2:
> > OK, I will add the '.yin' possibility.
> 
> IMO this is even worse.  Which suffix should I use?  What difference
> does it make?
> 
> > I would like to keep the file extension because 
> > ietf-yang-type@2015-12-07.yang looks more familiar
> 
> I think it is a bad idea to use something that looks familiar but
> change the meaning of it.  It is *not* a filename, it is a pair
> modulename + optional revision; an identifier for the module.
> 
> , will be easier to understand, than just
> > ietf-yang-types@2019-12-07
> > IMHO in practice systems might very well use it for file lookup.
> 
> But if I use this for file lookup, and I use YIN, and I try to use an
> instance file that lists the modules as ".yang", this won't work.
> 
> 
> Perhaps solve this by changing the leaf-list into:
> 
>   container inline-modules {
>     list module {
>       key name;
>       leaf name { ... }
>       leaf revision { ... }
>     }
>   }
> 
> /martin
> 
> BALAZS3: People explicitly asked for a short, simple solution, so
> reusing the well-known module-file-naming format seemed logical, and
> nobody misunderstood it till now.
> I would really like to avoid creating a list with 2 separate leaf's:
> longer, more complex. It goes against the express wishes of other
> group members.
> If you prefer we can drop the file extension.

Yes I think this is better.

> IMHO it will look strange.

Perhaps this document will set the standard for future references to
modules, so that this short-hand notation is used in more places,
rather than separate name / revision leafs...

BTW, you mentioned in your presentation of
draft-ietf-netconf-notification-capabilities that this doc will be
impacted by changes in draft-ietf-netmod-yang-instance-file-format.  I
think that this is ok and we continue the process for this document.
The RFC editor won't publish it until instance-file-format is done, so
there is time to fix the examples.


/martin