Re: [netmod] [Netconf] What should a server response be? - depending on NP-containers
Vladimir Vassilev <vladimir@transpacket.com> Tue, 23 August 2016 11:36 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 73FCA12B01B for <netmod@ietfa.amsl.com>; Tue, 23 Aug 2016 04:36:22 -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 1lnZa89ygheV for <netmod@ietfa.amsl.com>; Tue, 23 Aug 2016 04:36:20 -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 7B81712B018 for <netmod@ietf.org>; Tue, 23 Aug 2016 04:36:20 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by mail.transpacket.com (Postfix) with ESMTP id 56C64926791; Tue, 23 Aug 2016 13:36:18 +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 3UB9yHU3He1T; Tue, 23 Aug 2016 13:36:18 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1]) by mail.transpacket.com (Postfix) with ESMTP id 2D46992678E; Tue, 23 Aug 2016 13:36:18 +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 Yw8we7F6jzI2; Tue, 23 Aug 2016 13:36:18 +0200 (CEST)
Received: from [192.168.209.141] (s1853520235.blix.com [185.35.202.35]) by mail.transpacket.com (Postfix) with ESMTPSA id 0965A926786; Tue, 23 Aug 2016 13:36:18 +0200 (CEST)
Message-ID: <57BC3531.2020603@transpacket.com>
Date: Tue, 23 Aug 2016 13:36:17 +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: Martin Bjorklund <mbj@tail-f.com>, netmod@ietf.org
References: <57BC04E4.6090308@transpacket.com> <20160823.101517.293640528041965584.mbj@tail-f.com> <57BC0A70.1080006@transpacket.com> <20160823.110924.2249827059453254780.mbj@tail-f.com>
In-Reply-To: <20160823.110924.2249827059453254780.mbj@tail-f.com>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/sNO3mmGetXBUKHHeGKy86pFi7ds>
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 11:36:22 -0000
On 08/23/2016 11:09 AM, Martin Bjorklund wrote: > Vladimir Vassilev <vladimir@transpacket.com> wrote: >> On 08/23/2016 10:15 AM, Martin Bjorklund wrote: >>> They are evaluated. See Section 7.5.3: >>> >>> When a datastore is validated, all "must" constraints are >>> conceptually evaluated once for each node in the accessible tree (see >>> Section 6.4.1). >>> >>> >>> /martin >> Then we have the case I objected to and the example: >> >> YANG 1.0: >> >> augment "/if:interfaces/if:interface" { >> container inet { >> must "../name = 'me0'" { > This should have been a 'when' expression, not 'must'. Alternatively, > it should have been a P-container, since obviously the container has > some semantics. Or alternatively, the must expression should have > been on the address leaf, since this is what you really checked. I claim that any example of a must statement in non-presence container is affected in a similar way (Has anyone example that proves the contrary?). 'when' statements are alternative when the 'must' statement depends on data nodes that are not child nodes (which I admit is the case in this example). The thing with 'must' expressions in non-presence container is they are used in complicated models where 'mandatory' and 'choice' solutions are not an option and for whatever reason the design got to that point the fact is that by introducing the auto-evaluation of non-presence containers it is even more complicated to use them. Here an example that stops working in YANG 1.1: augment "/if:interfaces/if:interface" { container 2-company-3-crowd { must "(a and b and not(c)) or (not(a) and b and c) or (a and not(b) and c)" { } leaf a { type string; } leaf b { type string; } leaf c { type string; } } } ... to make it work one has to accept to not deny the creation of /interfaces/interface/2-company-3-crowd as empty container and modify the expression adding ...or (not(a) and not(b) and not(c)). That said I admit it is not often one needs non-presence container must statements. But in the cases one needs them the YANG 1.1 text is not helping. It causes all the statements to be processed when no one attempts to create them or child nodes residing in them. I find no justification for that. > > > > /martin > > >> description >> "The inet container is only valid for the management ('me0') >> interface."; >> } >> leaf address { >> type inet:ip-prefix; >> } >> } >> } >> >> YANG 1.1 (replace "../name = 'me0'" with "../name='me0' or not >> (./address)" and process 95 unnecessary Xpath evaluations). >> >> I think this proves the argument that there will be more unnecessary >> Xpath processing. In addition it illustrates how a simple task >> requires ugly patch (the ".. or not (./address)" added to the must >> expression) just to ensure the expression does not fail in the default >> case where the interface is not named "me0" and the user has not even >> attempted to create empty /interfaces/interface/inet container in YANG >> 1.1. >> >> Vladimir >>
- Re: [netmod] [Netconf] What should a server respo… Vladimir Vassilev
- Re: [netmod] [Netconf] What should a server respo… Andy Bierman
- Re: [netmod] [Netconf] What should a server respo… Juergen Schoenwaelder
- Re: [netmod] [Netconf] What should a server respo… Mahesh Jethanandani
- Re: [netmod] [Netconf] What should a server respo… Juergen Schoenwaelder
- Re: [netmod] [Netconf] What should a server respo… Vladimir Vassilev
- Re: [netmod] [Netconf] What should a server respo… Ladislav Lhotka
- Re: [netmod] [Netconf] What should a server respo… Vladimir Vassilev
- Re: [netmod] [Netconf] What should a server respo… Ladislav Lhotka
- Re: [netmod] [Netconf] What should a server respo… Vladimir Vassilev
- Re: [netmod] [Netconf] What should a server respo… Juergen Schoenwaelder
- Re: [netmod] [Netconf] What should a server respo… Vladimir Vassilev
- Re: [netmod] [Netconf] What should a server respo… Andy Bierman
- Re: [netmod] [Netconf] What should a server respo… Juergen Schoenwaelder
- Re: [netmod] [Netconf] What should a server respo… Martin Bjorklund
- Re: [netmod] [Netconf] What should a server respo… Andy Bierman
- Re: [netmod] [Netconf] What should a server respo… Vladimir Vassilev
- Re: [netmod] [Netconf] What should a server respo… Vladimir Vassilev
- Re: [netmod] [Netconf] What should a server respo… Juergen Schoenwaelder
- Re: [netmod] [Netconf] What should a server respo… Martin Bjorklund
- Re: [netmod] [Netconf] What should a server respo… Vladimir Vassilev
- Re: [netmod] [Netconf] What should a server respo… Alex Campbell
- Re: [netmod] [Netconf] What should a server respo… Vladimir Vassilev
- Re: [netmod] [Netconf] What should a server respo… Juergen Schoenwaelder
- Re: [netmod] [Netconf] What should a server respo… Vladimir Vassilev
- Re: [netmod] [Netconf] What should a server respo… Martin Bjorklund
- Re: [netmod] [Netconf] What should a server respo… Martin Bjorklund
- Re: [netmod] [Netconf] What should a server respo… Juergen Schoenwaelder
- Re: [netmod] [Netconf] What should a server respo… Vladimir Vassilev
- Re: [netmod] [Netconf] What should a server respo… Ladislav Lhotka
- Re: [netmod] [Netconf] What should a server respo… Martin Bjorklund
- Re: [netmod] [Netconf] What should a server respo… Ladislav Lhotka
- Re: [netmod] [Netconf] What should a server respo… Martin Bjorklund
- Re: [netmod] [Netconf] What should a server respo… Vladimir Vassilev