Re: [Netconf] Existence of Non-Presence Containers

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Thu, 28 June 2018 19:02 UTC

Return-Path: <j.schoenwaelder@jacobs-university.de>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0725E131064 for <netconf@ietfa.amsl.com>; Thu, 28 Jun 2018 12:02:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QCJsSyCEiea6 for <netconf@ietfa.amsl.com>; Thu, 28 Jun 2018 12:02:27 -0700 (PDT)
Received: from anna.localdomain (firewallix.jacobs-university.de [212.201.44.247]) by ietfa.amsl.com (Postfix) with ESMTP id D07DE13106F for <netconf@ietf.org>; Thu, 28 Jun 2018 12:02:22 -0700 (PDT)
Received: by anna.localdomain (Postfix, from userid 501) id 01AAC22B8142; Thu, 28 Jun 2018 21:02:20 +0200 (CEST)
Date: Thu, 28 Jun 2018 21:02:20 +0200
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: "Gary Wu (garywu)" <garywu=40cisco.com@dmarc.ietf.org>
Cc: "netconf@ietf.org" <netconf@ietf.org>
Message-ID: <20180628190220.6bq5nxskeja26gxk@anna.jacobs.jacobs-university.de>
Reply-To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
Mail-Followup-To: "Gary Wu (garywu)" <garywu=40cisco.com@dmarc.ietf.org>, "netconf@ietf.org" <netconf@ietf.org>
References: <928D9971-527D-4BB0-9200-D2C32CD4869D@cisco.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <928D9971-527D-4BB0-9200-D2C32CD4869D@cisco.com>
User-Agent: NeoMutt/20180622
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/VWP8N2XJX_-q20QbBKxQCYQSP1k>
Subject: Re: [Netconf] Existence of Non-Presence Containers
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.26
Precedence: list
List-Id: Network Configuration WG mailing list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 28 Jun 2018 19:02:45 -0000

On Thu, Jun 28, 2018 at 04:54:02PM +0000, Gary Wu (garywu) wrote:
> 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.

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.
 
> 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 says non-presence containers always exist in the xpath context.
 
> 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.

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/>