[netmod] Clarification about subtree filtering
Shiva Kumar Pathori <pathori@gmail.com> Tue, 22 May 2018 08:38 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 398FF126C26 for <netmod@ietfa.amsl.com>; Tue, 22 May 2018 01:38:51 -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 PVSLV02rsGqZ for <netmod@ietfa.amsl.com>; Tue, 22 May 2018 01:38:49 -0700 (PDT)
Received: from mail-oi0-x22f.google.com (mail-oi0-x22f.google.com [IPv6:2607:f8b0:4003:c06::22f]) (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 DD257124D68 for <netmod@ietf.org>; Tue, 22 May 2018 01:38:48 -0700 (PDT)
Received: by mail-oi0-x22f.google.com with SMTP id n65-v6so15472603oig.6 for <netmod@ietf.org>; Tue, 22 May 2018 01:38:48 -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; bh=wSHBMvmeJ8upvQRR51Nhtkng6h/5iewW9l+XXp8UFSQ=; b=rzRtxlomBhUp6WyicfPVSF5qVeb0mDevrqDjxubxcE+6WmUIeng+J1kd3yhvG2/RCO MSI0eqjV/zzplgyjFJ3T61ounVm2BstrghhkB6X6kf7IY+2tAFDAg+Xz3IB7u+XP9xbv OKqzy9yYBU10Y8Ph04aAQYqG0Nv3cKlLmGB0fIWI0/b5bISAGWdphuOjtASfOMkWOa3H 7sVI+xIYkfSPgCeOOqfq+q9UhA5CwshDOttcGtg8kxA8HRzJwE2YPNYAlHEleR3lLX1e fIrBIvG0szkN4DLV6aOEz+RXhOazdXxcwD2zrRwaTN75HX0e8AdJAg9zVyEBLzT2BNpo FI7w==
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; bh=wSHBMvmeJ8upvQRR51Nhtkng6h/5iewW9l+XXp8UFSQ=; b=PtIbUUYaytukiQwL5FyFDdvzLO0AOurbfXX5Y0W8o/OTZC/y5JUewojsG6HbSTYdcB riOWpDavXo3IcXBnWETtv6SuN/KqHrP6tRyWocxVOsQTkyxOIvp7o55BSWZKkc9LlpS6 1thNmoXC0emQ95kBA/BO3ZPoca569o8LlbnK7WB+VbRR6SFSK6z80yLev39xUk+42D3t lVJ0L1v8TavHlGa2hqXBhm2ibFtOPCfLWzitEXPS/cDzoHhYUFagKHTbvjnOL/CwB3PR JKFFVMaaplq+vqIt+l8AICLbNer468Y7b1tBs3OLPQZeLt+YpZeHneFeXxCdlevgi2qT HWig==
X-Gm-Message-State: ALKqPweljFjTs21PgieKj/HnsvQCoqBi9Ev1XUNY9M2ZEL+Im+CIN/Yh tbNxi1UBM31qglnxTJ3+iVYuCNn52P4xERz0FZo=
X-Google-Smtp-Source: AB8JxZp4xDSud/WdOmffLPNpQOJ42RrUy7ZL8kFq7TgbtclP27T88r44UvAPFLdAq81O7gE14Bc2ZdxAkhGozJQRY9s=
X-Received: by 2002:aca:d594:: with SMTP id m142-v6mr12732208oig.160.1526978327870; Tue, 22 May 2018 01:38:47 -0700 (PDT)
MIME-Version: 1.0
References: <CAJtYN8+WZjtjrhmGcNWTcpqFCcmwLNjT0LtRU_U8+x-EZhSwCA@mail.gmail.com>
In-Reply-To: <CAJtYN8+WZjtjrhmGcNWTcpqFCcmwLNjT0LtRU_U8+x-EZhSwCA@mail.gmail.com>
From: Shiva Kumar Pathori <pathori@gmail.com>
Date: Tue, 22 May 2018 14:08:35 +0530
Message-ID: <CAJtYN8LRJ0sXLWGDagpwiRDJSjgU70V+PW8yYdz9K7FNOJnUqw@mail.gmail.com>
To: netmod@ietf.org
Content-Type: multipart/alternative; boundary="000000000000d000eb056cc75899"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/TDskL3BkIWSbzSzTY7mckHedTOE>
Subject: [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: Tue, 22 May 2018 08:38:51 -0000
> 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