[Netconf] 4741bis (007) - return from XPath filters
Martin Bjorklund <mbj@tail-f.com> Mon, 09 November 2009 13:52 UTC
Return-Path: <mbj@tail-f.com>
X-Original-To: netconf@core3.amsl.com
Delivered-To: netconf@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 6831D3A6973 for <netconf@core3.amsl.com>; Mon, 9 Nov 2009 05:52:15 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.99
X-Spam-Level:
X-Spam-Status: No, score=-1.99 tagged_above=-999 required=5 tests=[AWL=0.056, BAYES_00=-2.599, HELO_MISMATCH_COM=0.553]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V6X120kmm+Gt for <netconf@core3.amsl.com>; Mon, 9 Nov 2009 05:52:14 -0800 (PST)
Received: from mail.tail-f.com (de-0316.d.ipeer.se [213.180.79.212]) by core3.amsl.com (Postfix) with ESMTP id 031293A6B5F for <netconf@ietf.org>; Mon, 9 Nov 2009 05:52:14 -0800 (PST)
Received: from localhost (c213-100-167-236.swipnet.se [213.100.167.236]) by mail.tail-f.com (Postfix) with ESMTPSA id 16F37616001 for <netconf@ietf.org>; Mon, 9 Nov 2009 14:52:40 +0100 (CET)
Date: Mon, 09 Nov 2009 14:52:39 +0100
Message-Id: <20091109.145239.111899012.mbj@tail-f.com>
To: netconf@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
X-Mailer: Mew version 6.2.51 on Emacs 22.2 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: [Netconf] 4741bis (007) - return from XPath filters
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Network Configuration WG mailing list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/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: Mon, 09 Nov 2009 13:52:15 -0000
Hi, http://trac.tools.ietf.org/wg/netconf/trac/wiki/Issues_4741bis#issue-007 This issue was discussed at the NETCONF session today. The question is what the resulting XML from an XPath filter looks like. For example, with this data model: list interface { key name; ... leaf mtu { ... } } What should the expression: select="/interface/mtu" return? 1. (no keys) <nc:data> <if:interface> <if:mtu>1500</if:mtu> </if:interface> <if:interface> <if:mtu>1500</if:mtu> </if:interface> </nc:data> 2. (keys) <nc:data> <if:interface> <if:name>eth0<if:name> <if:mtu>1500</if:mtu> </if:interface> <if:interface> <if:name>eth2</if:name> <if:mtu>1500</if:mtu> </if:interface> </nc:data> At least two implementations (mine and Andy's) return the keys, as in alternative 2. I suggest we add this to 8.9.1: The response message contains the subtrees selected by the filter expression. For each such subtree, the path from the data model root node down to the subtree, including any elements or attributes necessary to uniquely identify the subtree, are included in the response message. This is slightly different from how subtree filtering works. Compare these filters, with a data model where 'user' is a list with key 'name': <filter xmlns:t="http://example.com/schema/1.2/config" type="xpath" select="/t:top/t:users/t:user/t:company-info"/> and <filter type="subtree"> <top xmlns="http://example.com/schema/1.2/config"> <users> <user> <company-info/> </user> </users> </top> </filter> which look very similar. The first one returns: <top xmlns="http://example.com/schema/1.2/config"> <users> <user> <name>fred</name> <company-info> <id>2</id> </company-info> </user> </users> </top> but the second one doesn't return any keys (which is not very useful...) <top xmlns="http://example.com/schema/1.2/config"> <users> <user> <company-info> <id>2</id> </company-info> </user> </users> </top> Andy commented that his code returns the keys also in the subtree filter case. I'm not convinced the current text on subtree filtering allows this, but maybe we should clarify that key nodes MAY be added to the response message in subtree filtering. Since the text on subtree filtering says: The server does not need to utilize any data-model-specific semantics during processing, we cannot say that the keys MUST be added, so a client that needs the keys will still have to ask for them. /martin
- [Netconf] 4741bis (007) - return from XPath filte… Martin Bjorklund
- Re: [Netconf] 4741bis (007) - return from XPath f… David Reid
- Re: [Netconf] 4741bis (007) - return from XPath f… Ladislav Lhotka
- Re: [Netconf] 4741bis (007) - return from XPath f… Martin Bjorklund
- Re: [Netconf] 4741bis (007) - return from XPath f… Ladislav Lhotka
- Re: [Netconf] 4741bis (007) - return from XPath f… Martin Bjorklund
- Re: [Netconf] 4741bis (007) - return from XPath f… Ladislav Lhotka
- Re: [Netconf] 4741bis (007) - return from XPath f… Martin Bjorklund
- Re: [Netconf] 4741bis (007) - return from XPath f… Ladislav Lhotka
- Re: [Netconf] 4741bis (007) - return from XPath f… Martin Bjorklund
- Re: [Netconf] 4741bis (007) - return from XPath f… Ladislav Lhotka
- Re: [Netconf] 4741bis (007) - return from XPath f… Andy Bierman
- Re: [Netconf] 4741bis (007) - return from XPath f… Ladislav Lhotka