Subject: [Netconf] Existence of Non-Presence Containers

From: "Gary Wu (garywu)" <[email-masked]>
Date: Thu, 28 Jun 2018 16:54:02 +0000

Hi NETCONF WG,

I have a question about the definition of existence as it applies to
non-presence containers and the expected behavior when one performs a "create"
or "delete" operation on them in an <edit-config>.

RFC 6020 states:

7.5.8.  NETCONF <edit-config> Operations
   ...

   If a container does not have a "presence" statement and the last
   child node is deleted, the NETCONF server MAY delete the container.
   ...

The way I read this is that the existence of non-presence containers that have
no child data, as it relates to <edit-config>, is implementation-defined.

Another place where the existence of non-presence containers is mentioned is
for the XPath context.

RFC 7950 states:

6.4.1.  XPath Context
   ...

   If a node that exists in the accessible tree has a non-presence
   container as a child, then the non-presence container also exists in
   the accessible tree.
   ...

This seems to clearly define existence for non-presence containers, which has
implications on whether the container's child "must" statements are evaluated.
However, it does not say whether existence in the XPath context is equivalent
to existence in <edit-config> operations.  As well, this passage seems to have
been introduced for YANG 1.1 and is not present in RFC 6020.

Thanks,
Gary Wu

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Thu, 28 Jun 2018 21:02:20 +0200

> no child data, as it relates to <edit-config>, is implementation-defined.

The text says that if after applying edits there is an empty
non-presence container left in the datastore, then the server may
delete it.
 
>    container as a child, then the non-presence container also exists in

This says non-presence containers always exist in the xpath context.
 
> been introduced for YANG 1.1 and is not present in RFC 6020.

None of the quoted texts talks about "existence [on non-presence
containers] in <edit-config> operations". The first text talks about
data in a configuration datastore, the second text talks about the
xpath context.

/js

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