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

Andy Bierman <andy@yumaworks.com> Thu, 10 October 2019 15:34 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 4777C1200C1 for <netmod@ietfa.amsl.com>; Thu, 10 Oct 2019 08:34:46 -0700 (PDT)
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 xyLSFuwH8WXs for <netmod@ietfa.amsl.com>; Thu, 10 Oct 2019 08:34:43 -0700 (PDT)
Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) (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 1D15C12001A for <netmod@ietf.org>; Thu, 10 Oct 2019 08:34:43 -0700 (PDT)
Received: by mail-lj1-x234.google.com with SMTP id q64so6640815ljb.12 for <netmod@ietf.org>; Thu, 10 Oct 2019 08:34:43 -0700 (PDT)
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=xE7/15Dn/++AqaMMo6dV9FCkkqf6q3IOE8tDVxIiQCk=; b=SbS8o9TXj2Fw4ObzWHGHiqWRTk2IRZ3ZgnGZt+9chao11zlyfHYF5+owG2A871JaAc Q7srzhWYZSyZnA6FGaVb35eb05WhVgCilb5pZ+mB2hze1mwZHUPHwHUC/psi5kmYcjRt JU8/i36TbmbxhmX/pGlIs02BHZqAgYVrja/+ZlJjHDR82zRRuhJxL+b7kG4xYgQdqP34 d9DnT+jxD+G2+OhS0Dr07EN2UB9BQlNW9HKpHKInqCfhyxJUoI/nyoBY7YJmTCnKbKFu n7JxjnprfIAzizU0tA/q6BYCynsl/oZiNSH75k22iTl088mxV102iaProRePw+2vSR5p 3RMw==
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=xE7/15Dn/++AqaMMo6dV9FCkkqf6q3IOE8tDVxIiQCk=; b=U9KDKqm3KVd64z/3JF3WMwhN7ox6JJLepxdH4Fgc2HL2yPDeONB687+sazulR80QvR lNFSNzEt7cvoh6lg+t/9aKZpx2OG6KmP3bX8zZi0NgtSsLfIN3WWP2yJR+drTF4F+ZNW /VBTTUQ97LwRzoodeyCCEGyrPWMcdS0K/Dg9mJf1MdLdXgQhqFQfYGxgcQh/UvhBVz21 LoHNGnsLThA28EDBtmSlETs29UZmIV2bZCJjco4IyNbFKkw6Xr338QPlhddp8nF1Vjg/ tE9+OcNc8vS9yCa4PrbASWQRolZcuNH/2Sn7NN2lFkdDlS3KzvJ2M1gDmWXeCGuw/4ow T7kw==
X-Gm-Message-State: APjAAAX623SMW/Vod2EU8O9MWa9bNI8Oag6hHh4LjMBUNoJbHegKJiNi vAWNQCkgdFTWTZDxadybVo0/tN3NhYK308v7GH4PcCA+dlQ=
X-Google-Smtp-Source: APXvYqxOhsx2DRKosZ1HTnvGxvhBAI0wyM0zsyYsFnx74xiPVRwewTdUrzA6jCA1TJRvF858w9LEks+YkeR//OcEMZk=
X-Received: by 2002:a05:651c:8b:: with SMTP id 11mr6757785ljq.100.1570721680932; Thu, 10 Oct 2019 08:34:40 -0700 (PDT)
MIME-Version: 1.0
References: <20191010.140525.904627955349075516.mbj@tail-f.com>
In-Reply-To: <20191010.140525.904627955349075516.mbj@tail-f.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Thu, 10 Oct 2019 08:34:29 -0700
Message-ID: <CABCOCHShFd41gcGLTSjJQMWCA4Ak_QX2iHpng_6DBqLRf23vqw@mail.gmail.com>
To: Martin Bjorklund <mbj@tail-f.com>
Cc: NetMod WG <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000d55813059490232a"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/ZHb_j3FosvT1Q9j3k_fcilQzVEI>
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, 10 Oct 2019 15:34:46 -0000

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.


  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'.
>
>
>   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>
>
>
>

+1, except not in favor of so many ways to specify schema.
That means the file reader MUST support all of them.



>   o  Format the YANG module
>
>     I suggest you run the YANG module through:
>
>       pyang -f yang --keep-comments --yang-line-length 69
>
>   o  3.2
>
>     The element "<netconf-state>" needs a namespace declaration.
>
>
>
> /martin
>
>
>

Andy



>
>
>
> /martin
>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
>