Re: [netmod] Clarification needed for YANG 1.1 XPATH context
Martin Bjorklund <mbj@tail-f.com> Thu, 25 February 2016 15:31 UTC
Return-Path: <mbj@tail-f.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E8C301A901E for <netmod@ietfa.amsl.com>; Thu, 25 Feb 2016 07:31:07 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.907
X-Spam-Level:
X-Spam-Status: No, score=-1.907 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RP_MATCHES_RCVD=-0.006, SPF_PASS=-0.001] autolearn=ham
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 gTQ-vC_Fx3eF for <netmod@ietfa.amsl.com>; Thu, 25 Feb 2016 07:31:02 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 2331B1ACEF9 for <netmod@ietf.org>; Thu, 25 Feb 2016 07:31:02 -0800 (PST)
Received: from localhost (unknown [173.38.220.38]) by mail.tail-f.com (Postfix) with ESMTPSA id 4BEDD1AE0335; Thu, 25 Feb 2016 16:31:01 +0100 (CET)
Date: Thu, 25 Feb 2016 16:31:05 +0100
Message-Id: <20160225.163105.511576225570588684.mbj@tail-f.com>
To: wivory@Brocade.com
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <cac18b6591244715b79376188fa4c3fe@EMEAWP-EXMB12.corp.brocade.com>
References: <f790c7e329684d78bec27a1bfe150d6c@EMEAWP-EXMB12.corp.brocade.com> <20160225.161659.2204602310947308417.mbj@tail-f.com> <cac18b6591244715b79376188fa4c3fe@EMEAWP-EXMB12.corp.brocade.com>
X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/netmod/xUAKeTqos1F8CzvKwgLK6ymHGoY>
Cc: netmod@ietf.org
Subject: Re: [netmod] Clarification needed for YANG 1.1 XPATH context
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.15
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: Thu, 25 Feb 2016 15:31:08 -0000
William Ivory <wivory@Brocade.com> wrote: > > > -----Original Message----- > From: Martin Bjorklund [mailto:mbj@tail-f.com] > Sent: 25 February 2016 15:17 > To: William Ivory <wivory@Brocade.com> > Cc: netmod@ietf.org > Subject: Re: [netmod] Clarification needed for YANG 1.1 XPATH context > > William Ivory <wivory@Brocade.com> wrote: > > Hi, > > > > I'm looking for clarification on the meaning of the following > > paragraph in section 6.4.1 (XPATH context) in RFC6020bis: > > > > '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.' > > > > It's unclear to me what this is trying to say, and why - for example, > > does this mean that I need to validate any 'must' and 'when' > > statements on the child container even when nothing within that child > > container is configured? > > must expressions are always evaluated if the node where the must > expression is defined exists, regardless of the number of children > this node has. > > [wivory] So in my example where the child container (non-presence) has > NO children, then it doesn't exist, and any must statement on it > should not be run. Only when a non-presence container has a non-zero > number of children should any 'must' statements on that container be > run. > > [wivory] If that's the case, then would it be correct to say that the > intention of this paragraph is as a reminder that one must evaluate > 'must' statements on nodes that have no inherent meaning and exist > only because they contain child nodes? No; section 7.5.3 says: When a datastore is validated, all "must" constraints are conceptually evaluated once for each node in the accessible tree (see Section 6.4.1). And the quoted paragraph of 6.4.1 says that the NP-container (conceptually) exists if its parent exists - regardless of number of children. So if the parent exists, any must expressions in the NP-container are evaluated. /martin
- [netmod] Clarification needed for YANG 1.1 XPATH … William Ivory
- Re: [netmod] Clarification needed for YANG 1.1 XP… Martin Bjorklund
- Re: [netmod] Clarification needed for YANG 1.1 XP… William Ivory
- Re: [netmod] Clarification needed for YANG 1.1 XP… Martin Bjorklund
- Re: [netmod] Clarification needed for YANG 1.1 XP… William Ivory
- Re: [netmod] Clarification needed for YANG 1.1 XP… Radek Krejčí
- Re: [netmod] [yang-doctors] Clarification needed … Ladislav Lhotka