Re: [netmod] Clarification about subtree filtering
Shiva Kumar Pathori <pathori@gmail.com> Mon, 28 May 2018 18:05 UTC
Return-Path: <pathori@gmail.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 01A3012D964 for <netmod@ietfa.amsl.com>; Mon, 28 May 2018 11:05:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 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_NONE=-0.0001, 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 cKElM4Nuuar7 for <netmod@ietfa.amsl.com>; Mon, 28 May 2018 11:05:04 -0700 (PDT)
Received: from mail-ot0-x235.google.com (mail-ot0-x235.google.com [IPv6:2607:f8b0:4003:c0f::235]) (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 04A8912D95A for <netmod@ietf.org>; Mon, 28 May 2018 11:05:04 -0700 (PDT)
Received: by mail-ot0-x235.google.com with SMTP id i5-v6so14290324otf.1 for <netmod@ietf.org>; Mon, 28 May 2018 11:05:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=lAHQHp8jDjzIJbQGyoQAAiLUNqkEsgnz42rV3FGomdE=; b=oMYfoOfCdoHYREpKCZlS2ozE89i4QVlV0xQChX3q6/6QAormn/rfvsFuI7SFOcTQ3d 5S+r1IUlOp6wpHa8lH4IAhkTBHsRWsbHB4mYmcm8R+uHP95dTBb46ZnVSgoKrgdf/OcZ wkEh3xnipd+Ld6VOjIbKaUrlp9K9dbb+oZq3u4dOyHFsSJ+2ogONaWL4N8SmnwRtNuOs JHZuQwaGkmcX7xhAhjlyYjVY72jvrGhqot4BjrXd1hEET2LK9zTw17LAk3/72tjvgleI y32xJtTUbmJIpAF9r9Rn3WSowGeYVCQyVyds0oD0Fgud4fCfOjBTdQjNArKLM9q0fUv7 LcgA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=lAHQHp8jDjzIJbQGyoQAAiLUNqkEsgnz42rV3FGomdE=; b=aVpvvex1OwxPv73E57YRQvK0FPcBN/HJSyQUMDcl63UKHGi+LZVWsSkRub7zZ5L4Xo mo1tCEvzLlEoqDTqDsy349sN0bf7Z7RzzRc7M5+pFZftvYLIyrn7/1VS3eOnsAzzZXbm NhgXsf4JDdF8fes6+SJhxdQDjs4jNGIMMmoYVulAxeoafk30GMkyFtM/fB0dikVKWXEf EB6IX+nahRDg8uqkPzi8CmpEeiV3L9hyi4CPxzTvI/lcW4nRn7bNex0RiVo+lZTsVxMG a5Pbp/Mr9wgpdqyEaKJv/Hd+JjO39CnhvD4CIVfbJGbd53/zqrtIwS0nW2x1nqpxC6Nc gMvQ==
X-Gm-Message-State: ALKqPwe0051yU1E4LciuVpSHKCT7wAjDWXQ/vE26MzEz85oGfVaEu7wM 2pzVzX8JbHmQKyFdyLSQ/UwotnUWqekD/Q39Lg9HHA==
X-Google-Smtp-Source: ADUXVKIFGgsJVIQX6euhgUfYzUFKy+L4VWAEEKHBSppDbGY8gbw+eGPxxHFh9Qaoz2Y11KSLFqc0kMH/A/5L7COgKEQ=
X-Received: by 2002:a9d:36ed:: with SMTP id s42-v6mr8749794otd.131.1527530703372; Mon, 28 May 2018 11:05:03 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a9d:424:0:0:0:0:0 with HTTP; Mon, 28 May 2018 11:05:02 -0700 (PDT)
In-Reply-To: <20180528094814.rzovxin7q4hgshff@anna.jacobs.jacobs-university.de>
References: <CAJtYN8+WZjtjrhmGcNWTcpqFCcmwLNjT0LtRU_U8+x-EZhSwCA@mail.gmail.com> <CAJtYN8LRJ0sXLWGDagpwiRDJSjgU70V+PW8yYdz9K7FNOJnUqw@mail.gmail.com> <1527121561343.62896@Aviatnet.com> <CAJtYN8KKSGzUshaRDRds1SR7kxQyVH7T+WVErWhEbwcAZ2aFzw@mail.gmail.com> <20180528094814.rzovxin7q4hgshff@anna.jacobs.jacobs-university.de>
From: Shiva Kumar Pathori <pathori@gmail.com>
Date: Mon, 28 May 2018 23:35:02 +0530
Message-ID: <CAJtYN8KJFOdDZ6JQdNytji8LMaiF8yi=9mvgdU2avCk1gTW84g@mail.gmail.com>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>, Shiva Kumar Pathori <pathori@gmail.com>, Alex Campbell <Alex.Campbell@aviatnet.com>, netmod@ietf.org
Content-Type: multipart/alternative; boundary="000000000000f546f0056d47f45e"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/5J25hHO9tUbmbrT1U_vzmlSHiqE>
Subject: Re: [netmod] Clarification about subtree filtering
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
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: Mon, 28 May 2018 18:05:07 -0000
Hi, I also have put the same question in netconf group. On 28 May 2018 at 15:18, Juergen Schoenwaelder < j.schoenwaelder@jacobs-university.de> wrote: > Hi, > > this is a netconf question and not a netmod question. > > /js > > On Mon, May 28, 2018 at 02:57:19PM +0530, Shiva Kumar Pathori wrote: > > 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> > > >> > > >> > > >> 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> > > >> > > >> > > >> Regards, > > >> Shiva > > >> > > >> > > >> > > >> > > > _______________________________________________ > > netmod mailing list > > netmod@ietf.org > > https://www.ietf.org/mailman/listinfo/netmod > > > -- > Juergen Schoenwaelder Jacobs University Bremen gGmbH > Phone: +49 421 200 3587 Campus Ring 1 | 28759 Bremen | Germany > Fax: +49 421 200 3103 <https://www.jacobs-university.de/> >
- [netmod] Clarification about subtree filtering Shiva Kumar Pathori
- Re: [netmod] Clarification about subtree filtering Alex Campbell
- Re: [netmod] Clarification about subtree filtering Shiva Kumar Pathori
- Re: [netmod] Clarification about subtree filtering Juergen Schoenwaelder
- Re: [netmod] Clarification about subtree filtering Shiva Kumar Pathori