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

Andy Bierman <andy@yumaworks.com> Sun, 17 November 2019 23:07 UTC

Return-Path: <andy@yumaworks.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 CF21B120116 for <netmod@ietfa.amsl.com>; Sun, 17 Nov 2019 15:07:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.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 24yBBCaDnCFe for <netmod@ietfa.amsl.com>; Sun, 17 Nov 2019 15:07:21 -0800 (PST)
Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6788012010F for <netmod@ietf.org>; Sun, 17 Nov 2019 15:07:21 -0800 (PST)
Received: by mail-lj1-x22c.google.com with SMTP id 139so16681578ljf.1 for <netmod@ietf.org>; Sun, 17 Nov 2019 15:07:21 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vkmsCMhVmCNShSeI2hNpTaEXAu0P9tG1lpXGcCeXI4w=; b=OY2slOdRXToAKUBDKmNJaqbNj5Qo1J/G+pIF3VS+n3I5aZw4i649c2IDxyq2lwGXd9 6XQb6ZcuamogpFlmu+ZViXpbt/JoPgApdnot0/oweF8NAB8W7GAUnLxLIHr/tHylrBkh igUU4UWpO4HfzWjaNwTng2MQjuoLuZcR7LxN05kyPHNS1uEG3oy4jGP/03NDslkTWn4Y tcXpsqlxJRPSyNxUQITYP82g9UnAifs7isPEAdj22SuBFcZoY9O7C9wI/opvXENjq+01 e5omeNlOscecaGrhmWqPULkw447sfjr1e8vZ7ZVHcWFSHHhFbLC/vP346AInZolIbvx+ Zm/Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vkmsCMhVmCNShSeI2hNpTaEXAu0P9tG1lpXGcCeXI4w=; b=Ow37pzY/8TGncKh9Po0P7OhJ/hCfoAcrhJ7yui1u0awC6V4X9AaNsvf/tFqTnqug4+ 8lDXcOYKmevSC38U73j+lBWEVT1l41YW9rM/ntsFKnw9gJ+axhZ4gZ2vXPkXjNJfXv7g YhWsLAtiXDb5ZJJwPmhGpDwEAusoymhKkFb5XBJrK8dX/rl/tiXMjdlfVjdYyzQa//1W WTkLWmXvXGMjouaauAYbUCRiFsyXU5eE2Uncnd5urwGQSzpU12F7ygwV+dGHjPTi/ooo 3rPctX5Or3cHXiJc5LWukjKk+BMV6D+IeVvmbj/b++Qc7z81ora2jSju1EnlPd1YsVkh XUtA==
X-Gm-Message-State: APjAAAX4kc3aADn9QzhTuz4SvbweqI4ZdU51YumvrelTPYjoVMyfyL0B XIrVnJ2OwpAwJSULwsbmECyED1+f0HppeV0QphegCw==
X-Google-Smtp-Source: APXvYqw2YeIs45rMgf5Vwx2WxoXP22UQAwH4lzmjhFN39n6BgIEVUNZ6988adGJuk/vg+FZDNtHxTKe2PCVObPkMS88=
X-Received: by 2002:a2e:7319:: with SMTP id o25mr15050241ljc.207.1574032039477; Sun, 17 Nov 2019 15:07:19 -0800 (PST)
MIME-Version: 1.0
References: <AM7PR07MB62148A605167BD4D046A2E3DF0790@AM7PR07MB6214.eurprd07.prod.outlook.com> <20191107.091655.653448067546159616.mbj@tail-f.com> <AM7PR07MB6214B5582C8EA2CB2924DA05F0720@AM7PR07MB6214.eurprd07.prod.outlook.com> <20191117.175235.2089925675266198271.mbj@tail-f.com>
In-Reply-To: <20191117.175235.2089925675266198271.mbj@tail-f.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Sun, 17 Nov 2019 15:07:08 -0800
Message-ID: <CABCOCHR=g-c_V+nMTKLBicPAD3H9+Nr+4WU-wEjtqAMUmx5CgA@mail.gmail.com>
To: Martin Bjorklund <mbj@tail-f.com>
Cc: Balazs Lengyel <balazs.lengyel@ericsson.com>, NetMod WG <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000941cfe059792e47d"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/XUzy2i0m_01DsjRK-nkqd7MZoj8>
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: Sun, 17 Nov 2019 23:07:24 -0000

On Sun, Nov 17, 2019 at 8:52 AM Martin Bjorklund <mbj@tail-f.com> wrote:

> Hi,
>
> Balázs Lengyel <balazs.lengyel@ericsson.com> wrote:
> > See below BALAZS2.
> > -----Original Message-----
> > From: Martin Bjorklund <mbj@tail-f.com>
> > Sent: 2019. november 7., csütörtök 16:17
> > 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
> >
> > Balázs Lengyel <balazs.lengyel@ericsson.com> wrote:
> > > See below!    Balazs
> > >
> > >
> > >
> > > From: netmod <netmod-bounces@ietf.org> On Behalf Of Andy Bierman
> > > Sent: 2019. október 10., csütörtök 17:34
> > > To: Martin Bjorklund <mbj@tail-f.com>
> > > Cc: NetMod WG <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?
>
>
+1



> > 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:
>
>

I think your original proposal is the correct solution:

   mod-name [ @revision ]

The YANG module files (.yang or .yin) are not actually available, so unlike
<get-schema>,
they do not matter.  The file reader app needs to be capable of finding
module files on its own.



>   container inline-modules {
>     list module {
>       key name;
>       leaf name { ... }
>       leaf revision { ... }
>     }
>   }
>
>
> /martin
>

Andy