On Wed, Nov 6, 2019 at 3:07 PM Balázs Lengyel <[email protected]> wrote:
> See below, Balazs > > > > *From:* netmod <[email protected]> *On Behalf Of *Andy Bierman > *Sent:* 2019. október 10., csütörtök 19:38 > *To:* Martin Bjorklund <[email protected]> > *Cc:* NetMod WG <[email protected]> > *Subject:* Re: [netmod] comments on > draft-ietf-netmod-yang-instance-file-format-04 > > > > > > > > On Thu, Oct 10, 2019 at 8:34 AM Andy Bierman <[email protected]> wrote: > > > > > > On Thu, Oct 10, 2019 at 5:06 AM Martin Bjorklund <[email protected]> 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
_______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
