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

From: Martin Bjorklund <[email-masked]>
Date: Thu, 10 Oct 2019 14:05:25 +0200 (CEST)

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

  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>

  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

/martin

---

From: Andy Bierman <[email-masked]>
Date: Thu, 10 Oct 2019 08:34:29 -0700

>       pattern '.+(@\d{4}-\d{2}-\d{2})?';

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

>     The element "<netconf-state>" needs a namespace declaration.

Andy

>
>
>
> /martin
>
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod
>

---

From: Andy Bierman <[email-masked]>
Date: Thu, 10 Oct 2019 10:37:51 -0700

> 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