Re: [Netconf] Clarification about subtree filter
Shiva Kumar Pathori <pathori@gmail.com> Wed, 30 May 2018 08:20 UTC
Return-Path: <pathori@gmail.com>
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 3BF6312F2AC for <netconf@ietfa.amsl.com>; Wed, 30 May 2018 01:20:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 X0jXhbhsLSYV for <netconf@ietfa.amsl.com>; Wed, 30 May 2018 01:20:16 -0700 (PDT)
Received: from mail-oi0-x230.google.com (mail-oi0-x230.google.com [IPv6:2607:f8b0:4003:c06::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0F74812F4D3 for <netconf@ietf.org>; Wed, 30 May 2018 01:20:16 -0700 (PDT)
Received: by mail-oi0-x230.google.com with SMTP id f79-v6so1618951oib.7 for <netconf@ietf.org>; Wed, 30 May 2018 01:20:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=j5zBeDacyT63ad05BgfGR1sCB9O0h+wrTHq2eqvTBnI=; b=gLimqDKg/VDOzW4m74XykpDllUqFOtmxXdAfQPgdaASHCVkAW08LgZFZCR92XZYwa2 GalQP5R+iyavi4ATNBVk/nBMPLKhrNqYa2N2A/QFeDoRrguyTRHNMuTHdUGZ5p7dOWTt DExnNkb9A2nK7Ub/jhj5xKETNuNlL2Nz5dXaaOZ6XigFqQwz73q7oeYIHwhZd7lVQqVO qveSs0jD1p0uLGnpm6qlLT2bK8eO1rh522bddki+SyVFKwliVhyKVTabPp5+q7kE9c4t LTNbtB6XDGkByJBwRHfaj4IOhWc2HVsg+qLx209PXl2tlj7Yl7FLDCIvzAHs46dbudD6 cP/Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=j5zBeDacyT63ad05BgfGR1sCB9O0h+wrTHq2eqvTBnI=; b=nsV+FBUISAK3WlxJOinXpN9pne4IQzYQ564aEKjzeTkVuztgn1t7fQ+bnD5O6/vlwO vf5Y/agRUXMKK14tODtG+J/cwCCzFTWIcYgOQIc2y0mEjWRWi48nx2YxbmURUbHT+TbJ 4Mgow0oZ41aOeTEPK9IVb7ym2xUCEI6dLBx06l9j26gHiZxo7yFWkGTGBTNF8ZRMmZ1y J6hO+5pCT2qId2wSYSIah76a3dxp2n0DtMZXUF3ukkAJ6LZLjSPDYn9MtlsB5jDsrUjS O4p0OeKNRVGXBaGjXHOSd9Pajwys0bL2L8NihaPzHEBNMV3H1dMronRvxXC5IsRBQpmJ uv5g==
X-Gm-Message-State: ALKqPwdVYkjkdOXTUo/YwxygpRHn5Tsr0e51piqqshL93/QzLgEbOlL8 59BCJhYdiSSkDYtIyZUCQ+i+sWsiQb6pZLpARLM=
X-Google-Smtp-Source: ADUXVKIm9u16q4QXfYEBr+UCF9pAp1BEC/1izfgyclq8doxqJiLUpPO95/zkZD5BeQ6o79dSOpnhyF2sA32yoBbNBD0=
X-Received: by 2002:aca:e889:: with SMTP id f131-v6mr997086oih.324.1527668415213; Wed, 30 May 2018 01:20:15 -0700 (PDT)
MIME-Version: 1.0
References: <CAJtYN8K6YaZESGM5s4_b9+vDEsKFy=G890aaki2KJ2rW+ckKHA@mail.gmail.com> <20180530.082559.1524314498503473875.mbj@tail-f.com>
In-Reply-To: <20180530.082559.1524314498503473875.mbj@tail-f.com>
From: Shiva Kumar Pathori <pathori@gmail.com>
Date: Wed, 30 May 2018 13:50:04 +0530
Message-ID: <CAJtYN8Joj-MamSp8swDA5-WOR6-zdwXAqonSSpJbfNZArYS8Sw@mail.gmail.com>
To: Martin Bjorklund <mbj@tail-f.com>
Cc: netconf@ietf.org
Content-Type: multipart/alternative; boundary="00000000000039363c056d680535"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/_zXGLhNiaP5ie__BMkkGWkged6k>
Subject: Re: [Netconf] Clarification about subtree filter
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.22
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: Wed, 30 May 2018 08:20:20 -0000
So as per my understanding the xpath filter provided in the example should return empty data container. On Wed 30 May, 2018, 11:56 AM Martin Bjorklund, <mbj@tail-f.com> wrote: > Hi, > > Shiva Kumar Pathori <pathori@gmail.com> wrote: > > Hi, Sorry did not update subject line, It's updated now. > > > > On Wed 30 May, 2018, 2:53 AM , <netconf-request@ietf.org> wrote: > > > > > Send Netconf mailing list submissions to > > > netconf@ietf.org > > > > > > To subscribe or unsubscribe via the World Wide Web, visit > > > https://www.ietf.org/mailman/listinfo/netconf > > > or, via email, send a message with subject or body 'help' to > > > netconf-request@ietf.org > > > > > > You can reach the person managing the list at > > > netconf-owner@ietf.org > > > > > > When replying, please edit your Subject line so it is more specific > > > than "Re: Contents of Netconf digest..." > > > > > > > > > Today's Topics: > > > > > > 1. Re: Netconf Digest, Vol 123, Issue 43 (Shiva Kumar Pathori) > > > 2. How would RESTCONF access multiple datastores defined by NMDA > > > (Henry Yu) > > > > > > > > > ---------------------------------------------------------------------- > > > > > > Message: 1 > > > Date: Wed, 30 May 2018 01:29:53 +0530 > > > From: Shiva Kumar Pathori <pathori@gmail.com> > > > To: netconf@ietf.org > > > Subject: Re: [Netconf] Clarification about subtree filter > > > Message-ID: > > > < > > > CAJtYN8LBOrmZqSJug5n80UdSuOit2rZW8jQaUzsjNPyvs6Q3RQ@mail.gmail.com> > > > Content-Type: text/plain; charset="utf-8" > > > > > > Hi, > > > What could be the reason for not including the "<full-name>" leaf in > the > > > reply? > > > I see the example in section 6.4.5 in RFC 6241 include the above > mentioned > > > leaf when a content match node present in the filter. > > The reason is that in your example, there is a selection node > ("company-info") which means that data from that node only is included > in the reply. In 6.4.5 there is no selection node, which means that > all sibling nodes are selected. Compare with the example in 6.4.6. > > > /martin > > > > > > > > BTW, the reply is same for the both xpath and subtree filter RPCs > mentioned > > > in the mail? > > > > > > On 29 May 2018 at 00:30, <netconf-request@ietf.org> wrote: > > > > > > > Send Netconf mailing list submissions to > > > > netconf@ietf.org > > > > > > > > To subscribe or unsubscribe via the World Wide Web, visit > > > > https://www.ietf.org/mailman/listinfo/netconf > > > > or, via email, send a message with subject or body 'help' to > > > > netconf-request@ietf.org > > > > > > > > You can reach the person managing the list at > > > > netconf-owner@ietf.org > > > > > > > > When replying, please edit your Subject line so it is more specific > > > > than "Re: Contents of Netconf digest..." > > > > > > > > > > > > Today's Topics: > > > > > > > > 1. Re: Clarification about su tree filtering (Martin Bjorklund)Hi > > > > > > > > > > > > > ---------------------------------------------------------------------- > > > > > > > > Message: 1 > > > > Date: Mon, 28 May 2018 15:37:48 +0200 (CEST) > > > > From: Martin Bjorklund <mbj@tail-f.com> > > > > To: mjethanandani@gmail.com > > > > Cc: netconf@ietf.org > > > > Subject: Re: [Netconf] Clarification about su tree filtering > > > > Message-ID: <20180528.153748.2044064270808262081.mbj@tail-f.com> > > > > Content-Type: Text/Plain; charset=utf-8 > > > > > > > > Hi, > > > > > > > > See answers inline. > > > > > > > > > > > > Mahesh Jethanandani <mjethanandani@gmail.com> wrote: > > > > > Forwarding to NETCONF WG mailing list. > > > > > > > > > > Begin forwarded message: > > > > > > > > > > > From: Shiva Kumar Pathori <pathori@gmail.com> > > > > > > Date: May 28, 2018 at 5:27:19 AM EDT > > > > > > To: Alex Campbell <Alex.Campbell@aviatnet.com> > > > > > > Cc: netmod@ietf.org > > > > > > Subject: Re: [netmod] Clarification about subtree filtering > > > > > > > > > > > > Thanks Alex for the clarification. Can somebody please clarify > about > > > > subtree filter behaviour or provide some pointers in RFC so that I > can > > > > refer to it. > > > > > > > > > > > >> On Thu 24 May, 2018, 5:56 AM Alex Campbell, < > > > > Alex.Campbell@aviatnet.com> wrote: > > > > > >> Hi, > > > > > >> > > > > > >> > > > > > >> Since nobody else has answered I'll have a go. > > > > > >> I'm not familiar with subtree filtering, but I am with XPath. > > > > Assuming your XPath translation is accurate, it will return no data > > > > (response A). > > > > > >> > > > > > >> From: netmod <netmod-bounces@ietf.org> on behalf of Shiva Kumar > > > > Pathori <pathori@gmail.com> > > > > > >> Sent: Tuesday, 22 May 2018 8:38 p.m. > > > > > >> To: netmod@ietf.org > > > > > >> Subject: [netmod] Clarification about subtree filtering > > > > > >> > > > > > >> > > > > > >>> Hi, > > > > > >>> Can somebody clarify what could be the response for the > > > <get-config> > > > > operation provided below. > > > > > >>> > > > > > >>> Following is the user information in the datastore that is > provided > > > > in the RFC 6241 as example. > > > > > >>>> <rpc message-id="101" > > > > > >>>> xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> > > > > > >>>> <get-config> > > > > > >>>> <source> > > > > > >>>> <running/> > > > > > >>>> </source> > > > > > >>>> <filter type="subtree"> > > > > > >>>> <top xmlns="http://example.com/schema/1.2/config"> > > > > > >>>> <users/> > > > > > >>>> </top> > > > > > >>>> </filter> > > > > > >>>> </get-config> > > > > > >>>> </rpc> > > > > > >>> > > > > > >>>> <rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns: > > > > netconf:base:1.0"> > > > > > >>>> <data> > > > > > >>>> <top xmlns="http://example.com/schema/1.2/config"> > > > > > >>>> <users> > > > > > >>>> <user> > > > > > >>>> <name>root</name> > > > > > >>>> <type>superuser</type> > > > > > >>>> <full-name>Charlie Root</full-name> > > > > > >>>> <company-info> > > > > > >>>> <dept>1</dept> > > > > > >>>> <id>1</id> > > > > > >>>> </company-info> > > > > > >>>> </user> > > > > > >>>> <user> > > > > > >>>> <name>fred</name> > > > > > >>>> <type>admin</type> > > > > > >>>> <full-name>Fred Flintstone</full-name> > > > > > >>>> <company-info> > > > > > >>>> <dept>2</dept> > > > > > >>>> <id>2</id> > > > > > >>>> </company-info> > > > > > >>>> </user> > > > > > >>>> <user> > > > > > >>>> <name>barney</name> > > > > > >>>> <type>admin</type> > > > > > >>>> <full-name>Barney Rubble</full-name> > > > > > >>>> <company-info> > > > > > >>>> <dept>2</dept> > > > > > >>>> <id>3</id> > > > > > >>>> </company-info> > > > > > >>>> </user> > > > > > >>>> </users> > > > > > >>>> </top> > > > > > >>>> </data> > > > > > >>>> </rpc-reply> > > > > > >>> > > > > > >>> > > > > > >>> The <get-config> operation with content-match at parent and > child > > > > nodes; > > > > > >>> > > > > > >>>> <rpc message-id="101" xmlns="urn:ietf:params:xml:ns: > > > > netconf:base:1.0"> > > > > > >>>> <get-config> > > > > > >>>> <source> > > > > > >>>> <running/> > > > > > >>>> </source> > > > > > >>>> <filter type="subtree"> > > > > > >>>> <top xmlns="http://example.com/schema/1.2/config"> > > > > > >>>> <users> > > > > > >>>> <user> > > > > > >>>> <type>admin</name> > > > > > >>>> <company-info> > > > > > >>>> <dept>1</dept> > > > > > >>>> </company-info> > > > > > >>>> </user> > > > > > >>>> </users> > > > > > >>>> </top> > > > > > >>>> </filter> > > > > > >>>> </get-config> > > > > > >>>> </rpc> > > > > > >>> > > > > > >>> The equivalent XPATH expression : > > > > > >>>> <rpc message-id="101" xmlns="urn:ietf:params:xml:ns: > > > > netconf:base:1.0"> > > > > > >>>> <get-config> > > > > > >>>> <source> > > > > > >>>> <running/> > > > > > >>>> </source> > > > > > >>>> <filter xmlns:t="http://example.com/schema/1.2/config" > > > > > >>>> type="xpath" > > > > > >>>> select="/t:top/t:users/t:user[ > > > > t:type='admin']/t:company-info[t:dept=?1?]"/> > > > > > >>>> </get-config> > > > > > >>>> </rpc> > > > > > > > > This is not an equivalent expression, b/c a content-match node > ("type") > > > > is not AND:ed with a selection node ("company-info"). > > > > > > > > > >>> For this what could be the response > > > > > >>> > > > > > >>> a) The response based on content-match nodes are AND-ed > together > > > > > >>>> <rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns: > > > > netconf:base:1.0"> > > > > > >>>> <data> > > > > > >>>> </data> > > > > > >>>> </rpc-reply> > > > > > >>> OR > > > > > >>> > > > > > >>> b) The response based on content-match nodes treated > separately > > > > > >>>> <rpc-reply message-id="101" xmlns="urn:ietf:params:xml:ns: > > > > netconf:base:1.0"> > > > > > >>>> <data> > > > > > >>>> <top xmlns="http://example.com/schema/1.2/config"> > > > > > >>>> <users> > > > > > >>>> <user> > > > > > >>>> <name>fred</name> > > > > > >>>> <type>admin</type> > > > > > >>>> <full-name>Fred Flintstone</full-name> > > > > > >>>> </user> > > > > > >>>> <user> > > > > > >>>> <name>barney</name> > > > > > >>>> <type>admin</type> > > > > > >>>> <full-name>Barney Rubble</full-name> > > > > > >>>> </user> > > > > > >>>> </users> > > > > > >>>> </top> > > > > > >>>> </data> > > > > > >>>> </rpc-reply> > > > > > > > > Sibling content-match nodes are AND:ed, but in this case "type" and > > > > "dept" are not siblings. > > > > > > > > The correct reply is: > > > > > > > > <data> > > > > <top xmlns="http://example.com/schema/1.2/config"> > > > > <users> > > > > <user> > > > > <name>fred</name> (*) > > > > <type>admin</type> > > > > </user> > > > > <user> > > > > <name>barney</name> (*) > > > > <type>admin</type> > > > > </user> > > > > </users> > > > > </top> > > > > </data> > > > > > > > > (*) note that if the name is the key, it MAY (or may not) be present > > > > in the output, see 6.2.5 of RFC 6241: > > > > > > > > o If any sibling nodes of the selection node are instance > identifier > > > > components for a conceptual data structure (e.g., list key > leaf), > > > > then they MAY also be included in the filter output. > > > > > > > > > > > > > > > > /martin > > > > > > > > ------------------------------ > > > > > > > > Subject: Digest Footer > > > > > > > > _______________________________________________ > > > > Netconf mailing list > > > > Netconf@ietf.org > > > > https://www.ietf.org/mailman/listinfo/netconf > > > > > > > > > > > > ------------------------------ > > > > > > > > End of Netconf Digest, Vol 123, Issue 43 > > > > **************************************** > > > > > > > -------------- next part -------------- > > > An HTML attachment was scrubbed... > > > URL: < > > > > https://mailarchive.ietf.org/arch/browse/netconf/attachments/20180530/93583caa/attachment.html > > > > > > > > > > ------------------------------ > > > > > > Message: 2 > > > Date: Tue, 29 May 2018 17:23:07 -0400 > > > From: Henry Yu <hyu2010b@gmail.com> > > > To: netconf@ietf.org > > > Subject: [Netconf] How would RESTCONF access multiple datastores > > > defined by NMDA > > > Message-ID: > > > < > > > CAFsbzLkU5W5hL5Yb5YB3ft73idYoT1QPxXNWwMa_VBBvQ+c_GQ@mail.gmail.com> > > > Content-Type: text/plain; charset="utf-8" > > > > > > Hi, > > > > > > According to my understanding of RFC 8040, there is only one datastore > > > (which is represented by "{+restconf}/data"). But NMDA introduces > multiple > > > datastores. How does RESTCONF provide access to them? I think a > RESTCONF > > > user would, at minimum, need the access to the <running> and the > > > <operational>. > > > > > > Thanks, > > > Henry > > > P.S., I would not find an answer in the mailing list's archive. My > > > apologies if this question has already been asked/answered. > > > -------------- next part -------------- > > > An HTML attachment was scrubbed... > > > URL: < > > > > https://mailarchive.ietf.org/arch/browse/netconf/attachments/20180529/81c594a0/attachment.html > > > > > > > > > > ------------------------------ > > > > > > Subject: Digest Footer > > > > > > _______________________________________________ > > > Netconf mailing list > > > Netconf@ietf.org > > > https://www.ietf.org/mailman/listinfo/netconf > > > > > > > > > ------------------------------ > > > > > > End of Netconf Digest, Vol 123, Issue 44 > > > **************************************** > > > >
- Re: [Netconf] Clarification about subtree filter Shiva Kumar Pathori
- Re: [Netconf] Clarification about subtree filter Martin Bjorklund
- Re: [Netconf] Clarification about subtree filter Shiva Kumar Pathori
- Re: [Netconf] Clarification about subtree filter Martin Bjorklund