[Netconf] Clarification about su tree filtering (Was: [netmod] Clarification about subtree filtering)
Mahesh Jethanandani <mjethanandani@gmail.com> Mon, 28 May 2018 12:30 UTC
Return-Path: <mjethanandani@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 D91ED12D7E8 for <netconf@ietfa.amsl.com>; Mon, 28 May 2018 05:30:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 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, MIME_QP_LONG_LINE=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 aXyGvibTJIkh for <netconf@ietfa.amsl.com>; Mon, 28 May 2018 05:30:42 -0700 (PDT)
Received: from mail-qt0-x22c.google.com (mail-qt0-x22c.google.com [IPv6:2607:f8b0:400d:c0d::22c]) (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 6555E127AD4 for <netconf@ietf.org>; Mon, 28 May 2018 05:30:42 -0700 (PDT)
Received: by mail-qt0-x22c.google.com with SMTP id e8-v6so14685754qth.0 for <netconf@ietf.org>; Mon, 28 May 2018 05:30:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:references:from:message-id:date:to :content-transfer-encoding:mime-version; bh=uPZtYGIE075vqC8Gw1d0z+HLJOrxzADoEZt/8emFJRA=; b=fWPGAmLrEHLtj+z13238cZPTwFg3kLPn68M35KOCQDetZmbOhQkhzP74bPWg/PBJHM tzb5hmVmJuiubgcv2roTnvHbf5LyNT2BnIKPWBhNq7RFVkG1srO4PAPCz7ll4A2V2OzT LuyQcc0UVWHIux0x/BwtIbXWFxFjrylDWQ4AGgujzMABFardRoseT+XS0jIXxAtid8Pd SYlw3ditruf5ZCZrdHHwHyC9m3GLCsoV5PiF1EeBguM8eEkJcPG/MAJsorBTbOJonDPi uyNFEySe93H6IxnDtEyztk1U3809+gZGaSpewJKvfbSpepsO2IqyF8h9n151krMTOVlQ u26Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:references:from:message-id:date:to :content-transfer-encoding:mime-version; bh=uPZtYGIE075vqC8Gw1d0z+HLJOrxzADoEZt/8emFJRA=; b=E+Gl5bAUcEaApFkZE3PRoDocNNTmEnjD+ANLO8ldwAliaxsxvEVK2o4M3FmQQRSieY 6E4SnaZpwhIvChqMssBzWR24SfPzy+IHH/aSDcmQYOWxDvLS+qelnvoAuR8IuPbT6MEx 9QcsGi7IOlUPUrQM7ZOup/X2CQ+rtlQK0obuXCMf1Q47AALWG2oKTs4W1z44RdCsvtyQ j+fInO6laE87WPQHRoUZTf1MkBfh6tW8RY//BXe97EYwFR5aizzWaiDEAPDtmUZOuPiB 2DbIlsUodztB9LtE+vCXoPZS3/08BviJGvV/CV6CD472yZM1FRsFqlE/l/25ptoOA/Gz CpdA==
X-Gm-Message-State: ALKqPwe4nEhkGs4VO/hGV+jMfIljufu2pPEx/7w1eVL3ni76QqabvCFM PGy1l1yhrnsjUI53w7cYeZJjIA0t
X-Google-Smtp-Source: ADUXVKKKW3kVzeqkikfBZYA7OYJGeLg099caBtpBrt4BwXJHmE7+lH9Cg5KUlNuqXqgYD1z0V9vgxA==
X-Received: by 2002:ac8:4312:: with SMTP id z18-v6mr12513059qtm.417.1527510641383; Mon, 28 May 2018 05:30:41 -0700 (PDT)
Received: from [172.20.10.2] ([172.58.232.127]) by smtp.gmail.com with ESMTPSA id x28-v6sm24861936qtx.95.2018.05.28.05.30.36 for <netconf@ietf.org> (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 May 2018 05:30:40 -0700 (PDT)
References: <CAJtYN8KKSGzUshaRDRds1SR7kxQyVH7T+WVErWhEbwcAZ2aFzw@mail.gmail.com>
From: Mahesh Jethanandani <mjethanandani@gmail.com>
Content-Type: multipart/alternative; boundary="Apple-Mail-4E6EB238-B07D-4E42-9878-30620FCB5CD7"
X-Mailer: iPad Mail (13G36)
Message-Id: <0F71DA52-A89C-41AF-96F7-312B5A8F89FF@gmail.com>
Date: Mon, 28 May 2018 08:30:46 -0400
To: netconf@ietf.org
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (1.0)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/a4RK_Z1_owo74v5YxsulqIM5V2I>
Subject: [Netconf] Clarification about su tree filtering (Was: [netmod] Clarification about subtree filtering)
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: Mon, 28 May 2018 12:30:45 -0000
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> >>> >>> 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
- [Netconf] Clarification about su tree filtering (… Mahesh Jethanandani
- Re: [Netconf] Clarification about su tree filteri… Martin Bjorklund