Re: [netmod] Regarding origin-filter in draft-ietf-netconf-nmda-netconf-08
Martin Bjorklund <mbj@tail-f.com> Wed, 30 January 2019 08:56 UTC
Return-Path: <mbj@tail-f.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 A08F5130F1D for <netmod@ietfa.amsl.com>; Wed, 30 Jan 2019 00:56:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 cTo3F_CYhr9f for <netmod@ietfa.amsl.com>; Wed, 30 Jan 2019 00:56:01 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 7BA19128CB7 for <netmod@ietf.org>; Wed, 30 Jan 2019 00:56:01 -0800 (PST)
Received: from localhost (h-4-215.A165.priv.bahnhof.se [158.174.4.215]) by mail.tail-f.com (Postfix) with ESMTPSA id 2A3641AE012C; Wed, 30 Jan 2019 09:55:58 +0100 (CET)
Date: Wed, 30 Jan 2019 09:55:58 +0100
Message-Id: <20190130.095558.1264661153680469484.mbj@tail-f.com>
To: ammys.vas@gmail.com
Cc: netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <CAKiLt9+Fo8ysaAo3AE8wdDnvL6QY_+kytM1xqCQOxX4GG1Z78g@mail.gmail.com>
References: <CAKiLt9+Fo8ysaAo3AE8wdDnvL6QY_+kytM1xqCQOxX4GG1Z78g@mail.gmail.com>
X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/pxs9sPJQiSUqGRvH630IZk6WnPw>
Subject: Re: [netmod] Regarding origin-filter in draft-ietf-netconf-nmda-netconf-08
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
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: Wed, 30 Jan 2019 08:56:04 -0000
Hi,
Amar Jadagoud <ammys.vas@gmail.com> wrote:
> Hi,
>
> I have one doubt regarding origin-filter filtering in case of parent-child
> hierarchy.
>
> If child class instance fields match with origin-filter value but parent
> class instance fields does not, then what should be the rpc-reply content?
> Does it need to include parent class instance record with only key fields
> along with child class record or it should not include both parent and
> child class instance record?
This is not special for origin-filter, but applies to all filters.
The description of get-data says:
Any ancestor nodes (including list keys) of nodes selected by
the filters are included in the response.
Hope this answers your question.
/martin
>
> Consider example given in 3.1.1.4 section of
> draft-ietf-netconf-nmda-netconf-08 :
>
> <rpc message-id="102"
> xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
> <get-data xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-nmda"
> xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"
> xmlns:or="urn:ietf:params:xml:ns:yang:ietf-origin">
> <datastore>ds:operational</datastore>
> <subtree-filter>
> <bgp xmlns="http://example.com/ns/bgp"/>
> </subtree-filter>
> <origin-filter>or:intended</origin-filter>
> <origin-filter>or:system</origin-filter>
> <with-origin/>
> </get-data>
> </rpc>
>
>
> <rpc-reply message-id="102"
> xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
> <data xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-nmda">
> <bgp xmlns="http://example.com/ns/bgp"
> xmlns:or="urn:ietf:params:xml:ns:yang:ietf-origin"
> or:origin="or:intended">
> <peer>
> <name>2001:db8::2:3</name>
> <local-port or:origin="or:system">60794</local-port>
> <state>established</state>
> </peer>
> </bgp>
> </data>
> </rpc-reply>
>
> In the above example, user has provided origin-filter as system and
> intended in the RPC request. So rpc-reply has both parent record with
> "intended" origin and child record with "system" origin.
>
> What if user has provided only origin-filter="system" ? Do we need to
> provide parent record with "intended" origin in the rpc-reply or should not
> provide both parent and child record ?
>
> Thanks,
> Amar
- [netmod] Regarding origin-filter in draft-ietf-ne… Amar Jadagoud
- Re: [netmod] Regarding origin-filter in draft-iet… Martin Bjorklund
- Re: [netmod] Regarding origin-filter in draft-iet… Amar Jadagoud
- Re: [netmod] Regarding origin-filter in draft-iet… Martin Bjorklund
- Re: [netmod] Regarding origin-filter in draft-iet… Juergen Schoenwaelder
- Re: [netmod] Regarding origin-filter in draft-iet… Amar Jadagoud
- Re: [netmod] Regarding origin-filter in draft-iet… Martin Bjorklund
- Re: [netmod] Regarding origin-filter in draft-iet… Amar Jadagoud
- Re: [netmod] Regarding origin-filter in draft-iet… Martin Bjorklund