Re: [netmod] [Last-Call] Yangdoctors last call review of draft-ietf-netmod-factory-default-07
On Wed, Nov 27, 2019 at 06:35:24AM -0800, Carl Moberg via Datatracker wrote: > Reviewer: Carl Moberg > Review result: Ready with Nits > > This is my YANG doctors review of the ietf-factory-default.yang module as > part of draft-ietf-netmod-factory-default-07. > > The module cleanly passes validation using the YANG validator site and > I have successfully loaded it into one NETCONF server implementation. > > This module is ready with a cosmetic nit and a suggestion. > > I suggest fixing the following textual nit: > > OLD >configuration datastores (i.e., , ) to >their factory default content."; > > NEW: >configuration datastores (i.e. , , and >) to their factory default content."; FWIW, the RFC style guide wants both comma and space after "i.e." (and comma before it, as well, when not enclosed in a parenthetical). -Ben ___ netmod mailing list netmod@ietf.org https://www.ietf.org/mailman/listinfo/netmod
Re: [netmod] Question about schema-mount
Hi, "Bogaert, Bart (Nokia - BE/Antwerp)" wrote: > Hi Martin, > > -Original Message- > From: Martin Bjorklund > Sent: Thursday, November 28, 2019 9:28 AM > To: Bogaert, Bart (Nokia - BE/Antwerp) > Cc: netmod@ietf.org > Subject: Re: [netmod] Question about schema-mount > > Hi, > > "Bogaert, Bart (Nokia - BE/Antwerp)" wrote: > > Hi, > > > > We're trying to figure out whether it is possible to define a module > > in the parent schema which would use a node being a leafref to a node > > in a model under a mount point. > > In order for this to work, the leafref target would have to be present > at compile time / design time. RFC 8528 defines Design time, > Implementation time, and Run time mounts, and says: "Design-time > mounts are outside the scope of this document" (see section 1). > > Another alternative would be some new kind of "leafref-like" construct > that supported this. > > What you can do though is to ensure the leaf in the parent module is > of the same type as the mounted node you want to refer to, and explain > in text what the semantics is. > > [Bogaert, Bart] Thanks for this feedback. The use case we're looking > into is the following: > [Bogaert, Bart] A forwarder contains references to interfaces which > are defined as leafref with path /interfaces/interface/name. In the > scope of this question the path would be > /logical-network/elements/logical-network-element/interfaces/interface/name. > Question is: will this work with leafref? No, since a YANG compiler that sees this leafref will fail to find the target and thus throw an error. [side note: a single leafref wouldn't work anyway, since you would the name of both the lne and the name of the interface] > What will the [Bogaert, > Bart] NETCONF server do in such a case, in other word: is it able to > resolve this leafref or do we have to define this as a some kind of > string that includes the name of the logical-network-element and the > name of the interface? Yes, a single string or two leafs, 'lne-name' and 'if-name'. /martin > > I don't seem to find any statement > > that would prohibit this but RFC 8530, referred to from the schema > > mount RFC, uses a leafref to a node in a module which is still in the > > list of YANG modules of the parent (and consequently in the YANG > > library of the parent). > > > > So, using RFC8530 as example: > > > > Instead of lne:bind-lne-name being a leafref to > > /logical-network-elements/logical-network-element/name we would point > > to > > /logical-network-elements/logical-network-element/interfaces/interface/name. > > > > The interfaces YANG module is also part of the YANG library of the > > parent but I'm not so sure whether above construction would work well > > as the information related to the mounted YANG modules is in a YANG > > library different from the parent's YANG library. > > > > Note that there is also some confusion with the examples in RFC8530: > > while the bind-lne-name in the YANG module is a leafref as syntax, the > > examples work with a string as syntax for that same leaf. > > Do you mean the tree diagram? > > [Bogaert, Bart] Correct. > > Best regards, Bart > >module: ietf-interfaces > +--rw interfaces > +--rw interface* [name] >+--rw namestring >+--rw lne:bind-lne-name? string > > This looks like a bug to me; it should be a leafref. > > > /martin > ___ netmod mailing list netmod@ietf.org https://www.ietf.org/mailman/listinfo/netmod
Re: [netmod] Question about schema-mount
Hi Martin, -Original Message- From: Martin Bjorklund Sent: Thursday, November 28, 2019 9:28 AM To: Bogaert, Bart (Nokia - BE/Antwerp) Cc: netmod@ietf.org Subject: Re: [netmod] Question about schema-mount Hi, "Bogaert, Bart (Nokia - BE/Antwerp)" wrote: > Hi, > > We're trying to figure out whether it is possible to define a module > in the parent schema which would use a node being a leafref to a node > in a model under a mount point. In order for this to work, the leafref target would have to be present at compile time / design time. RFC 8528 defines Design time, Implementation time, and Run time mounts, and says: "Design-time mounts are outside the scope of this document" (see section 1). Another alternative would be some new kind of "leafref-like" construct that supported this. What you can do though is to ensure the leaf in the parent module is of the same type as the mounted node you want to refer to, and explain in text what the semantics is. [Bogaert, Bart] Thanks for this feedback. The use case we're looking into is the following: [Bogaert, Bart] A forwarder contains references to interfaces which are defined as leafref with path /interfaces/interface/name. In the scope of this question the path would be /logical-network/elements/logical-network-element/interfaces/interface/name. Question is: will this work with leafref? What will the [Bogaert, Bart] NETCONF server do in such a case, in other word: is it able to resolve this leafref or do we have to define this as a some kind of string that includes the name of the logical-network-element and the name of the interface? > I don't seem to find any statement > that would prohibit this but RFC 8530, referred to from the schema > mount RFC, uses a leafref to a node in a module which is still in the > list of YANG modules of the parent (and consequently in the YANG > library of the parent). > > So, using RFC8530 as example: > > Instead of lne:bind-lne-name being a leafref to > /logical-network-elements/logical-network-element/name we would point > to > /logical-network-elements/logical-network-element/interfaces/interface/name. > > The interfaces YANG module is also part of the YANG library of the > parent but I'm not so sure whether above construction would work well > as the information related to the mounted YANG modules is in a YANG > library different from the parent's YANG library. > > Note that there is also some confusion with the examples in RFC8530: > while the bind-lne-name in the YANG module is a leafref as syntax, the > examples work with a string as syntax for that same leaf. Do you mean the tree diagram? [Bogaert, Bart] Correct. Best regards, Bart module: ietf-interfaces +--rw interfaces +--rw interface* [name] +--rw namestring +--rw lne:bind-lne-name? string This looks like a bug to me; it should be a leafref. /martin ___ netmod mailing list netmod@ietf.org https://www.ietf.org/mailman/listinfo/netmod
Re: [netmod] Question about schema-mount
Hi, "Bogaert, Bart (Nokia - BE/Antwerp)" wrote: > Hi, > > We're trying to figure out whether it is possible to define a module > in the parent schema which would use a node being a leafref to a node > in a model under a mount point. In order for this to work, the leafref target would have to be present at compile time / design time. RFC 8528 defines Design time, Implementation time, and Run time mounts, and says: "Design-time mounts are outside the scope of this document" (see section 1). Another alternative would be some new kind of "leafref-like" construct that supported this. What you can do though is to ensure the leaf in the parent module is of the same type as the mounted node you want to refer to, and explain in text what the semantics is. > I don't seem to find any statement > that would prohibit this but RFC 8530, referred to from the schema > mount RFC, uses a leafref to a node in a module which is still in the > list of YANG modules of the parent (and consequently in the YANG > library of the parent). > > So, using RFC8530 as example: > > Instead of lne:bind-lne-name being a leafref to > /logical-network-elements/logical-network-element/name we would point > to > /logical-network-elements/logical-network-element/interfaces/interface/name. > > The interfaces YANG module is also part of the YANG library of the > parent but I'm not so sure whether above construction would work well > as the information related to the mounted YANG modules is in a YANG > library different from the parent's YANG library. > > Note that there is also some confusion with the examples in RFC8530: > while the bind-lne-name in the YANG module is a leafref as syntax, the > examples work with a string as syntax for that same leaf. Do you mean the tree diagram? module: ietf-interfaces +--rw interfaces +--rw interface* [name] +--rw namestring +--rw lne:bind-lne-name? string This looks like a bug to me; it should be a leafref. /martin ___ netmod mailing list netmod@ietf.org https://www.ietf.org/mailman/listinfo/netmod