Re: [netmod] Clarification about subtree filtering
Shiva Kumar Pathori <pathori@gmail.com> Mon, 28 May 2018 09:27 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 7D4FC126579 for <netmod@ietfa.amsl.com>; Mon, 28 May 2018 02:27:34 -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 iMFfUnAsP0ew for <netmod@ietfa.amsl.com>; Mon, 28 May 2018 02:27:32 -0700 (PDT)
Received: from mail-oi0-x233.google.com (mail-oi0-x233.google.com [IPv6:2607:f8b0:4003:c06::233]) (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 5ECDD124BAC for <netmod@ietf.org>; Mon, 28 May 2018 02:27:32 -0700 (PDT)
Received: by mail-oi0-x233.google.com with SMTP id l1-v6so9840706oii.1 for <netmod@ietf.org>; Mon, 28 May 2018 02:27:32 -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=AbD96Jp6KVfTzPbEnVXlxm0xVNkwzGWdCCfmjbuf43w=; b=EVAfNtjFdD/5rNe+72hpyFYMVv7oaa+S5rbzcFtoy2yywDt92X1/B5xQ+gkgNEMObK D27cQoMA3ILy/hmTFBfleCEeHmpAy34cUpppYTKoOGV8Elsh19V1ho+M6k30mzYn8KbP 2QyqF3aiWXzhHYcb2HIGISLxLqduwwt8hY49dAj7Fkh2kuzeRrWKtSDNwCddJ3B9Pfgb XfSqBx2NQVDULJfgZ1v0SauaWP6m9+MLU5JONSrn8FUxSa4yJwIBWMvub1nDuzu5fudH ODXjwx3+inIGEw7IaPaoK6UvKkEetEl/j4VXpMWzHwNos3hFhoQZik273yQQCHXz5LGH F67g==
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=AbD96Jp6KVfTzPbEnVXlxm0xVNkwzGWdCCfmjbuf43w=; b=t/XfXW2bkqqGJiqgk+E4flBVXeCjJrPl+4YYOuQOKw2MtbjAsUkQEymLt+l8qLRx8u ioWRKCP/wUKVI007+lNh4FRAGBRGexSi6p6swAlZ7qlWzpXWyiV8Enl35kcEfnl/qXz4 hril/LSQxJ4iHbzQArqfQyuc9MrYgh5ncUWm38JSNiCmJlGTsX+cDe6n24YuSB1LaVob uMODuC4eHpOaUz9YHkFJ4KM6dhQ3MnPfoHQgPWbMNcGdgrLTdxZrKarL4mShzhdAty5N hFFoyd9qUiIgSbalzIZzBsrmQlAqx5LnWJbq5aw2wn9TCClrCJBtfHs5U/ll864muTX7 wy5g==
X-Gm-Message-State: ALKqPwc/V226guIP681JvzVbAwlEw58SAaozwFC6nboiEEQV/pwLGG4Z BEfsS6d1Co9mwN9qh+DLdiMc9k4kOJNsPwAgv88=
X-Google-Smtp-Source: AB8JxZqUlGkBfItuNGwgF+kwDPEb2eXXNQqfM2IRf6GYe+JOloeJgfi/0w7me2ovBiZMUxK/RmdvwLx2vZcPtiH6t3s=
X-Received: by 2002:aca:d594:: with SMTP id m142-v6mr6599852oig.160.1527499651701; Mon, 28 May 2018 02:27:31 -0700 (PDT)
MIME-Version: 1.0
References: <CAJtYN8+WZjtjrhmGcNWTcpqFCcmwLNjT0LtRU_U8+x-EZhSwCA@mail.gmail.com> <CAJtYN8LRJ0sXLWGDagpwiRDJSjgU70V+PW8yYdz9K7FNOJnUqw@mail.gmail.com> <1527121561343.62896@Aviatnet.com>
In-Reply-To: <1527121561343.62896@Aviatnet.com>
From: Shiva Kumar Pathori <pathori@gmail.com>
Date: Mon, 28 May 2018 14:57:19 +0530
Message-ID: <CAJtYN8KKSGzUshaRDRds1SR7kxQyVH7T+WVErWhEbwcAZ2aFzw@mail.gmail.com>
To: Alex Campbell <Alex.Campbell@aviatnet.com>
Cc: netmod@ietf.org
Content-Type: multipart/alternative; boundary="000000000000225ff7056d40ba4a"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/lPztj93UQ3lwbqW05TWKP19EZsM>
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 09:27:34 -0000
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] 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