Re: [netmod] [Netconf] What should a server response be? - depending on NP-containers

Vladimir Vassilev <vladimir@transpacket.com> Tue, 23 August 2016 06:42 UTC

Return-Path: <vladimir@transpacket.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0E93912B04D for <netmod@ietfa.amsl.com>; Mon, 22 Aug 2016 23:42:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-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 FvpLVb4hQRZA for <netmod@ietfa.amsl.com>; Mon, 22 Aug 2016 23:42:36 -0700 (PDT)
Received: from mail.transpacket.com (s91205186171.blix.com [91.205.186.171]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5E9D412B006 for <netmod@ietf.org>; Mon, 22 Aug 2016 23:42:36 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by mail.transpacket.com (Postfix) with ESMTP id 9138C9265A8; Tue, 23 Aug 2016 08:42:34 +0200 (CEST)
Received: from mail.transpacket.com ([127.0.0.1]) by localhost (mail.transpacket.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ryhQ2nke0c2c; Tue, 23 Aug 2016 08:42:34 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1]) by mail.transpacket.com (Postfix) with ESMTP id 637129265A5; Tue, 23 Aug 2016 08:42:34 +0200 (CEST)
Received: from mail.transpacket.com ([127.0.0.1]) by localhost (mail.transpacket.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id LrbkwVZ-ox6X; Tue, 23 Aug 2016 08:42:34 +0200 (CEST)
Received: from [192.168.209.141] (s1853520235.blix.com [185.35.202.35]) by mail.transpacket.com (Postfix) with ESMTPSA id 40F5892659F; Tue, 23 Aug 2016 08:42:34 +0200 (CEST)
Message-ID: <57BBF05A.7040006@transpacket.com>
Date: Tue, 23 Aug 2016 08:42:34 +0200
From: Vladimir Vassilev <vladimir@transpacket.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0
MIME-Version: 1.0
To: Alex Campbell <Alex.Campbell@Aviatnet.com>, netmod@ietf.org
References: <57BB2169.9050100@transpacket.com> <20160822.184543.235535345519950294.mbj@tail-f.com> <57BB37FC.5000202@transpacket.com> <20160822.202715.1748199491210115278.mbj@tail-f.com>, <57BB5554.2000400@transpacket.com> <1471903699434.77842@Aviatnet.com>
In-Reply-To: <1471903699434.77842@Aviatnet.com>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/6IAdh4N3LjH2NgsFOUV_LFC4Jgw>
Subject: Re: [netmod] [Netconf] What should a server response be? - depending on NP-containers
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 23 Aug 2016 06:42:38 -0000

On 08/23/2016 12:08 AM, Alex Campbell wrote:
> The intention in this case is obviously to evaluate the 'must' statement if
> the container contains any values; what would break if we said that
>
>     A non-presence container exists in the data tree if and only if it has
>     any children which exist in the data tree.
>
> thus disallowing the existence of empty NP-containers in the data tree?

The question is where is the misunderstanding.

    "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 tree."

What does this mean? I believe there is confusion based on "the tree" 
refering not to the data tree but the Xpath context. At least I hoped 
until I realized the text was introduced as a solution to Y41 
'clarification of "must" in NP-container'. That definitely means it 
addresses the must statements in the non-presence containers and it 
means "the tree" as in the data tree.

1. If "then the non-presence container also exists in the tree." is 
refering to the Xpath context and not the data tree (which is not 
obvious since nowhere is the Xpath context introduced as "the tree") 
then the Xpath validation statements in the non-presence container do 
not have to be evaluated. The only effect is that other Xpath 
expressions testing for the existence of the non-presence container will 
return true.

2. If the meaning is that the non-presence container exists virtually in 
the data tree and its pertaining Xpath expressions have to be evaluated 
then there is a problem. Then it is not only that many unnecessary Xpath 
evaluations will be processed but also designers have to make sure their 
Xpath expressions do not fail when the non-presence container is not 
even created (it is not a problem if the user attempts to create it 
empty then at least there is some bad initiative from him asking for 
error message). Like in the example there will be 95 errors for all 
containers not part of the interface named "me0". There can never be a 
valid configuration for YANG 1.1 for this example. If the must statement 
is modified from must "../name = 'me0'" to "../name='me0' or not 
(./address)" then it will work as intended in YANG 1.0 with the overhead 
of 95 unnecessary evaluations.

If the text you propose is added without the current text removed it 
will be even more difficult to understand the clarification.

Vladimir