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

Martin Bjorklund <mbj@tail-f.com> Thu, 07 November 2019 08:08 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 A87DA120274 for <netmod@ietfa.amsl.com>; Thu, 7 Nov 2019 00:08:39 -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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 tnV-1XLjK2Si for <netmod@ietfa.amsl.com>; Thu, 7 Nov 2019 00:08:37 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 99A6B120123 for <netmod@ietf.org>; Thu, 7 Nov 2019 00:08:37 -0800 (PST)
Received: from localhost (unknown [173.38.220.41]) by mail.tail-f.com (Postfix) with ESMTPSA id 6FDD41AE0389; Thu, 7 Nov 2019 09:08:35 +0100 (CET)
Date: Thu, 07 Nov 2019 09:08:06 +0100 (CET)
Message-Id: <20191107.090806.62241800390258021.mbj@tail-f.com>
To: balazs.lengyel@ericsson.com
Cc: netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <AM7PR07MB621477C933EE522C6C2EA3B2F0790@AM7PR07MB6214.eurprd07.prod.outlook.com>
References: <20191010.140525.904627955349075516.mbj@tail-f.com> <AM7PR07MB621477C933EE522C6C2EA3B2F0790@AM7PR07MB6214.eurprd07.prod.outlook.com>
X-Mailer: Mew version 6.8 on Emacs 25.2
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/oT4Qwd5sWZLWBvWI4uMCyuZF_a4>
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: Thu, 07 Nov 2019 08:08:40 -0000

Hi,

Balázs Lengyel <balazs.lengyel@ericsson.com>; wrote:
> Hello Martin,
> I will update the draft following most of your comments. See details below.
> Regards Balazs
> 
> -----Original Message-----
> From: netmod <netmod-bounces@ietf.org>; On Behalf Of Martin Bjorklund
> Sent: 2019. október 10., csütörtök 14:05
> To: netmod@ietf.org
> Subject: [netmod] comments on draft-ietf-netmod-yang-instance-file-format-04
> 
> Hi,
> 
> I have some mostly cosmetic comments on this draft.
>   o  "YANG" should be spelled "YANG".  Not Yang etc.
> BALAZS: OK
>   o  "NETCONF" should be spelled "NETCONF".
> BALAZS: OK
>   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).
> BALAZS: I disagree, IMHO we need the revision date. We want to know the 
> exact version the data was produced against. If the version would be 
> unknown it might become very hard to understand whether the instance 
> data is correct or not.

The point is that the revision statement is optional in YANG.  If the
module doesn't have a revision statement I can't list it here.

> 
>   o  schema-uri
>     The description says:
>           A reference to another YANG instance data file.
>           This instance data file will use the same set of target
>           YANG modules, revisions, supported features and deviations
>           as the referenced YANG instance data file.
> 
>    I don't understand what this means.  Does it mean that the schema
>    for this document is the same as the schema defined in the
>    schema-uri file, or that the schema-uri file defines the schema in
>    its content-data?
> 
>    I *think* it is the former.  In either case, the name of the leaf
>    can perhaps be changed to reflect the semantics, rather than the
>    syntax (i.e., don't call it xxx-uri just b/c its type is an uri).
>    Perhaps 'same-schema-as-file'.
> BALAZS:  OK, I changed the description hope it is easier to understand now.
>             description
>               "A reference to another YANG instance data file.
>                This instance data file will use the same
>                content schema as the referenced file.";

Thanks, better.  Perhaps: s/will use/uses/

>   o  Data node naming.
>     The current structure of the model is:
>         +--rw (content-schema-spec)?
>         |  +--:(simplified-inline)
>         |     +--rw module*                 string
>         |  +--:(inline)
>         |  |  +--rw inline-spec*            string
>         |  |  +--rw inline-content-schema   <anydata>
>         |  +--:(uri)
>         |     +--rw schema-uri?           inet:uri
>         ...
>         +--rw content-data?         <anydata>
> 
> 
>     To make the instance document more understandable, I suggest the
>     following structure, which adds a wrapping container for the
>     schema, and renames the inline and uri nodes:
> 
>         +--rw content-schema
>            +--rw (content-schema-spec)?
>            |  +--:(simplified-inline)
>            |     +--rw module*                 string
>            |  +--:(inline)
>            |  |  +--rw inline-module*          string
>            |  |  +--rw inline-schema           <anydata>
>            |  +--:(uri)
>            |     +--rw same-schema-as-file?    inet:uri
>         ...
>         +--rw content-data?         <anydata>
> BALAZS: OK, accepted
> 
>   o  Format the YANG module
>     I suggest you run the YANG module through:
>       pyang -f yang --keep-comments --yang-line-length 69
> BALAZS: OK (I will do it, but I don't agree with a number of its formatting
> changes.
> 
>   o  3.2
>     The element "<netconf-state>" needs a namespace declaration.
> BALAZS: OK


/martin