Subject: [Netconf] RESTCONF #18 and #19

From: Andy Bierman <[email-masked]>
Date: Fri, 24 Jul 2015 03:43:42 -0700

Hi,

There was some discussion (albeit truncated by the WG chairs)
about how anyxml should be handled in retrieval operations
using the "fields" or "depth" parameters.

There was also much confusion wrt/ the proposed changes.
The WG does not yet understand the issue.

The first order problem to solve is whether these query
parameters apply to the YANG schema (A) or the conceptual
instance document (B) (e.g., running datastore contents).

If the answer is the YANG schema, then it is quite clear
that an anyxml (or anydata) is a terminal node.
As such, the entire anyxml or anydata node is
treated as a leaf (i.e., no further depth levels exist
and no subnodes can be selected with a fields parameter.)

Here is an example because the WG is totally confused
how this works:

   container top {
      anyxml foo;
   }

   <top>
      <foo>
          <bar>42</bar>
          <baz>43</baz>
      </foo>
  </top>

  GET /restconf/data/top/foo?depth=1

(A)
   <foo>
      <bar>42</bar>
      <baz>43</baz>
   </foo>

(B)
   <foo />

  GET /restconf/data/foo?fields=bar

(A)

   fields ignored since no schema node
   (not sure if error returned or empty data)

(B)

  <foo>
     <bar>42</bar>
  </foo>

(A) treats foo as a leaf
(B) treats foo as a subtree with child nodes

In order to implement (A) the server MUST understand
the YANG schema.  We have previously said this
is not required.

We need NETMOD WG to clarify anydata wrt/
(A) or (B).  The intent seems to be that (B)
would be returned.

Proposed Changes:

For anyxml, it is implementation-specific what the server
returns.

For anydata, the server MUST implement (B), which
does not require knowledge of the YANG schema but
does require that descendants of anydata are proper
YANG data nodes

Andy

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Fri, 24 Jul 2015 12:54:00 +0200

> For anyxml, it is implementation-specific what the server

I think this is what the totally confused WG agreed on yesterday.
 
> does require that descendants of anydata are proper

Yes, I expect filters to operate on the instance tree.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>

---

From: Andy Bierman <[email-masked]>
Date: Fri, 24 Jul 2015 04:12:23 -0700

> I think this is what the totally confused WG agreed on yesterday.

OK -- I should have made an example in the slides to
address the confusion.  Trying to do that now on the mailing list

> Yes, I expect filters to operate on the instance tree.

agreed

Andy