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

Andy Bierman <andy@yumaworks.com> Wed, 06 November 2019 23:44 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 24395120043 for <netmod@ietfa.amsl.com>; Wed, 6 Nov 2019 15:44:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 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] 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 um5isjlMri1g for <netmod@ietfa.amsl.com>; Wed, 6 Nov 2019 15:43:57 -0800 (PST)
Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) (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 D0023120025 for <netmod@ietf.org>; Wed, 6 Nov 2019 15:43:56 -0800 (PST)
Received: by mail-lj1-x22e.google.com with SMTP id k15so155591lja.3 for <netmod@ietf.org>; Wed, 06 Nov 2019 15:43:56 -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=xBMv4rDwQkVY3EyXzrjzFg/ZZSUonAxgyAvyB3W48/Q=; b=dA1jqkIzjN3reW3xbMXUgRdmZ0sR27yoQYKxSM46tXw3FZw1j0ehkcc0TuAst5Mv7M 2gLiC+l+xGhZhq2zODJNaRduJTKi/JgkUATNw5Hhq42OASZilbjyV4wMJvbxHever20m xLx8azaJdxB4/mki636/AwxeXllecqrh27v/LFNP7d9uiKSvmcoIy2xrwc8YJA2OSMWk SVPFHyIuuj34f5h4WmEKJ/qzLNNGspNjv/6jkGqxyRgZThY/o60QsRpy9TLMZ5r4jHOM y+Ym6ybc674JCqKZ6hJNR1+QMgRf5EzhcNv1AjX9AUKoq5qJ7QpSlL18cwvmj4TwciaG 5vMg==
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=xBMv4rDwQkVY3EyXzrjzFg/ZZSUonAxgyAvyB3W48/Q=; b=jh0gI6Ct3NF5xv9402rA4joXj25vmsPOGSkpKdf2TdNPM75zsRyTVyNFDnAb03L2Xw OrxVsksqiT0A2DwchosDRo6Ca4Ss/zrl4YVfeRnPyseqRF3NcB+puPWMvaiZpIATKbMd 7eIuDNMie7YRsfhBVUuGt/wZF33SzFOw1uCs9tibI3DAyyonuWLLmk+hd0A1TgN3Jqgv LpxXXVVaEKjfJaTOt7SwubD4xHAxS+Wq4qC5MgTQEP0GeMtLH93vziwqcB9mBQhSAY+S T0ClksSe0VPYDpuhW2YPFadMRqXWdlCkUCPaHLq2Xj1frUQGBihoFglxaDCIZC2BbjZg 8Fiw==
X-Gm-Message-State: APjAAAVlxfPwWGOIKcLBnXIbEcPh7/IVUdQwBd4EiIYrK9nD5Kn0jYzw olKWgThzyYyyhOew6a+8w/K+X72GKW+Db9/vJWvJRA==
X-Google-Smtp-Source: APXvYqxg1LCgQZ3Df2niBLg6NjN8XchLcjHknCqPb5sQtNjB4IYKxIR7ez61qBwINHV/zPUlmdItQ4lJdJXodXirnfs=
X-Received: by 2002:a05:651c:1127:: with SMTP id e7mr63624ljo.70.1573083834961; Wed, 06 Nov 2019 15:43:54 -0800 (PST)
MIME-Version: 1.0
References: <20191010.140525.904627955349075516.mbj@tail-f.com> <CABCOCHShFd41gcGLTSjJQMWCA4Ak_QX2iHpng_6DBqLRf23vqw@mail.gmail.com> <CABCOCHQsuHR_Y_LR53_VVLSAeuMQWG8Ae_-C2v-GSj-9RELGTg@mail.gmail.com> <AM7PR07MB621401A82C579C14C2D42C82F0790@AM7PR07MB6214.eurprd07.prod.outlook.com>
In-Reply-To: <AM7PR07MB621401A82C579C14C2D42C82F0790@AM7PR07MB6214.eurprd07.prod.outlook.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 6 Nov 2019 15:43:43 -0800
Message-ID: <CABCOCHSCsbmNmeQadriQy=WMrJ1E+O7zinr6fXN-o2D_W05bdQ@mail.gmail.com>
To: =?UTF-8?Q?Bal=C3=A1zs_Lengyel?= <balazs.lengyel@ericsson.com>
Cc: Martin Bjorklund <mbj@tail-f.com>, NetMod WG <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000002f67ae0596b61f58"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/XZb5YZG9DTGF6yMwfJAoctInMrg>
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: Wed, 06 Nov 2019 23:44:00 -0000

On Wed, Nov 6, 2019 at 3:07 PM 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 19:38
> *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 8:34 AM Andy Bierman <andy@yumaworks.com>; wrote:
>
>
>
>
>
> On Thu, Oct 10, 2019 at 5:06 AM Martin Bjorklund <mbj@tail-f.com>; wrote:
>
> Hi,
>
> I have some mostly cosmetic comments on this draft.
>
>   o  "YANG" should be spelled "YANG".  Not Yang etc.
>
>
>   o  "NETCONF" should be spelled "NETCONF".
>
>
>   o  leaf-list module
>
>     The type of this leaf-list is a string with:
>
>       pattern '.+@\d{4}-\d{2}-\d{2}\.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
>
>
>
> 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.
>
>
>
>
>
>
>
> Sorry about the confusion over this comment.
>
>
>
> There should be reusable typedefs defined in rfc6991bis representing the
> format in 7950, sec. 5.2
>
>
>
> There should also be file extensions defined for an XML or JSON file that
> is expected to
>
> follow the YIF structure.
>
>
>
>
>
> Andy
>
> BALAZS:
>
> For the modules listed in leaf-list module: These are real YANG schema
> files so IMO the “.yang” extension should be used.
>
> For the instance data files: In the -00 version of the draft it was stated
> that the files should have their own extension “.yid” .
>
> “.yid-json” and “.yid-xml” was also discussed.
>
> However, the group requested that I just use .json and .xml  as extensions
> (as described in section 3.)
>
>
IMO section 3 is too specific about the content within the content-data
node.
The only requirement should be that it is valid XML or JSON according to
the schema listed.  All content should be identified, so if you include
or:origin attributes
then ietf-origin MUST be in the schema list.  It is a bad idea to
force tools to accept
invalid XML (e.g., no xmlns for a prefix that is used.

The text about the required file-name structure if timestamps are present
seems rather arbitrary.  What if the tool generating the file is not aware
of
specific YANG objects, so it does not know there are data nodes
representing timestamps?
Why is this needed? The file contains revision and timestamp meta-data.


   If the leaf name is present in the instance data header this MUST
      be used.  Revision-date MUST be set to the latest revision date
      inside the instance data set.


I do not understand the text above.
IMO none of sec. 3 MUST requirements are needed.
Looks like a lot of CLRs to me.

Hard to see what harm to the Internet is caused
by a YID file that is named "incorrectly".  Tools will create their own
file extensions, because
lumping everything in with .xml or .json is shortsighted. Why does the
standard say SHALL
use .xml or .json?  Is this a general requirement for all XML or JSON
content?
If not, then why is being added here?

How does the tool that reads the YID file know what version of the YID
template is being used?
(Or do you think this module is perfect, and will never be updated?)
Seems like the very first leaf should be a "yid-version", similar to
"yang-version" in YANG.


Andy