On Thu, Jun 16, 2016 at 7:08 AM, Ladislav Lhotka <lho...@nic.cz> wrote:
> > > On 16 Jun 2016, at 15:58, Martin Bjorklund <m...@tail-f.com> wrote: > > > > Ladislav Lhotka <lho...@nic.cz> wrote: > >> > >>> On 16 Jun 2016, at 15:12, Andy Bierman <a...@yumaworks.com> wrote: > >>> > >>> > >>> > >>> On Mon, Jun 13, 2016 at 8:30 AM, Ladislav Lhotka <lho...@nic.cz> > wrote: > >>> > >>>> On 13 Jun 2016, at 16:39, Andy Bierman <a...@yumaworks.com> wrote: > >>>> > >>>> > >>>> > >>>> On Mon, Jun 13, 2016 at 5:42 AM, Ladislav Lhotka <lho...@nic.cz> > wrote: > >>>> Andy Bierman <a...@yumaworks.com> writes: > >>>> > >>>>> Hi, > >>>>> > >>>>> I am trying to implement YANG 1.1 must-stmt extensions. > >>>>> They appear to be under-specified. > >>>>> > >>>>> In sec. 7.5.3 > >>>>> > >>>>> The XPath expression is conceptually evaluated in the following > >>>>> context, in addition to the definition in Section 6.4.1 > >>>>> < > https://tools.ietf.org/html/draft-ietf-netmod-rfc6020bis-13#section-6.4.1 > >: > >>>>> > >>>>> o The context node is the node in the accessible tree for which > the > >>>>> "must" statement is defined. > >>>>> > >>>>> > >>>>> The problem for input/output is that these nodes are not encoded > >>>>> in any NETCONF RPC or action invocation. Sec. 6.4.1 clearly defines > the > >>>>> XPath context for input and output, so 7.5.3 is incorrect. > >>>>> > >>>>> 7.5.3 should say the context node for input/output is the node > representing > >>>>> the RPC operation. This would be the same for NETCONF encoding of > action. > >>>>> The RESTCONF encoding for RPC and action is completely different > >>>>> but the definition in 7.5.3 is actually correct for RESTCONF. > >>>> > >>>> This should not depend on any encoding, an XPath expression is > evaluated > >>>> on a conceptual data tree, and this tree is defined for operations, > too. > >>>> > >>>> > >>>> > >>>> The <input> and <output> nodes do not appear at all > >>>> in the instance document for NETCONF so this bullet in 7.5.3 is wrong > >>>> for those nodes. > >>>> > >>>> For <notiofication>, the child of <notification> is already specified > >>>> as the child of docroot. > >>> > >>> OK, so this is about "must" statements specified directly under > input/output and notification statements, right? I had the same comment > previously: > >>> > >>> https://www.ietf.org/mail-archive/web/netmod/current/msg14469.html > >>> > >>> My understanding is that in the former case the context node is the > root of the input/output data tree, and in the latter case it is the node > with the same name as the notification. > >>> > >>> I agree it should be better explained. > >>> > >>> > >>> > >>> If you already brought up this issue, then why is the text still > incorrect? > >> > >> The subsequent discussion convinced me that it can be easily fixed, > >> and then I lost it from the radar, unfortunately. > > > > I lost track of this issue as well :( > > > > Anyway, I think my original proposed fix to this issue should work: > > > > OLD: > > > > o The context node is the node in the accessible tree for which the > > "must" statement is defined. > > > > NEW: > > > > o If the "must" statement is a substatement of a "notification" > > statement, the context node is the node representing the > > notification in the accessible tree. > notification foo { must "leaf-a > 4"; leaf leaf-a { type int32; } } <notification> <foo> <leaf-a>5</leaf-a> </foo> </notification> The text might confuse people into thinking <notification> is the context instead of <foo>. The XPath section says the accessible tree root has <foo> as a child node, but it is not obvious. > > > o If the "must" statement is a substatement of a "input" > > statement, the context node is the node representing the > > operation in the accessible tree. > > > > o If the "must" statement is a substatement of a "output" > > statement, the context node is the node representing the > > operation in the accessible tree. > > What is "the node representing the operation in the accessible tree"? I > think it should rather be "the root node of the operation request/reply > instance". Unlike notifications, operations request/reply isn't wrapped in > an element with the operation's name. > It is different for NETCONF and RESTCONF How about "representing the root of the operation input in the accessible tree" > Lada > Andy > > > > > o Otherwise, the context node is the node in the accessible tree > > for which the "must" statement is defined. > > > > > > Note that the original email thread quickly started to discuss the > > accessible tree, but the proposed text above does not change the > > accessible tree. > > > > > > /martin > > -- > Ladislav Lhotka, CZ.NIC Labs > PGP Key ID: E74E8C0C > > > > >
_______________________________________________ netmod mailing list netmod@ietf.org https://www.ietf.org/mailman/listinfo/netmod