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

Andy Bierman <andy@yumaworks.com> Thu, 10 October 2019 17:38 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 C14CB12010C for <netmod@ietfa.amsl.com>; Thu, 10 Oct 2019 10:38:07 -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 j4jn29kCw5Nh for <netmod@ietfa.amsl.com>; Thu, 10 Oct 2019 10:38:05 -0700 (PDT)
Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) (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 133901200C3 for <netmod@ietf.org>; Thu, 10 Oct 2019 10:38:05 -0700 (PDT)
Received: by mail-lj1-x235.google.com with SMTP id l21so7088957lje.4 for <netmod@ietf.org>; Thu, 10 Oct 2019 10:38:04 -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=CadVY6G3HnPLjdAxD+zLyuPwCdP5g51v2l5xMm8yUqg=; b=TYJ+LZoXF7RBCoi+yxRg3/FozvXB83RA0Tkk/9RiB6g3W1yrQ+M2S0LcaMditlqYvX sA6+XKsAktiNEVObIQ23uqAOHLSCPSXRSDqisqqJTugyr+ySh0TQZVirc5VwEjit4diX N9vLNQkooBpY0Ja75LZiMgunj1eGWPe1pqRAmLX6f889vlpPusUbKPOZCEmRIACwhVax rQJ2gViidUbfcHwIom1/PnkQ6uSbzHnv7zvsaiAXk7/fva/NKWoaRGidDzXw7RdiTMo0 WDsVW2UJDUAt2ygg3VNPd7oX+uCPdzI4OzLj+VX4PcRGKsZdsTggCe+zViPBa3jmtNPB XCxg==
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=CadVY6G3HnPLjdAxD+zLyuPwCdP5g51v2l5xMm8yUqg=; b=gR9OvD9t3NwTBxPkfGN6Q+NsrL9tB4goUEXT98rckT/XdvO4b9fY9MIZII3qBfqH81 BlbCj6MayZwvAm2o1+We0n70E9w7ot9c2OfznZci00OpgDZmgYTLC1XZmR8h5ugqo/S+ 0JUmgDyUT+pRzDEKAI++lnJSvZXtnt6vkdO+xtvhYi9MZjmYmvRA68YDmeI59opccSMJ HajByy8epij5CPlZP0dYdI554PFjQeegReahH8n3WIPJdTQalkNN8nxg3R8ob+6/wQCb PyFFOn92ef4PU09kamPyJT2e8tdaWHQEFOqIiQLznF9l2Sgc6VRd4mHansByJrZqiu9I hAbg==
X-Gm-Message-State: APjAAAX84JMMqRssDeUiUGgZ5orhQl0Ki2pzBeQzQsApmKvz05pYbkSP Tx0cLj4C4WcYUnS1Mq9dhYdJrQhBvT130e0PBFJ1zg==
X-Google-Smtp-Source: APXvYqw1U+0Vre24TnfOwj6KM3/aDYjdcAnBdH5uArDBP1jFbQgkRjlVlXyJA5/+KhfyHDRVO3BVrv2GNVM1DmZCCoY=
X-Received: by 2002:a2e:86cd:: with SMTP id n13mr7232541ljj.252.1570729083203; Thu, 10 Oct 2019 10:38:03 -0700 (PDT)
MIME-Version: 1.0
References: <20191010.140525.904627955349075516.mbj@tail-f.com> <CABCOCHShFd41gcGLTSjJQMWCA4Ak_QX2iHpng_6DBqLRf23vqw@mail.gmail.com>
In-Reply-To: <CABCOCHShFd41gcGLTSjJQMWCA4Ak_QX2iHpng_6DBqLRf23vqw@mail.gmail.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Thu, 10 Oct 2019 10:37:51 -0700
Message-ID: <CABCOCHQsuHR_Y_LR53_VVLSAeuMQWG8Ae_-C2v-GSj-9RELGTg@mail.gmail.com>
To: Martin Bjorklund <mbj@tail-f.com>
Cc: NetMod WG <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000000b06fb059491dde1"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/78w44R6Hho04bjTcfA4xn45TBD0>
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 17:38:08 -0000

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




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