Re: [netmod] Regarding origin-filter in draft-ietf-netconf-nmda-netconf-08

Amar Jadagoud <ammys.vas@gmail.com> Wed, 30 January 2019 10:46 UTC

Return-Path: <ammys.vas@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 0DA0D1311DA for <netmod@ietfa.amsl.com>; Wed, 30 Jan 2019 02:46:18 -0800 (PST)
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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=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 4Ddn6exobMQ3 for <netmod@ietfa.amsl.com>; Wed, 30 Jan 2019 02:46:15 -0800 (PST)
Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) (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 6C032130F44 for <netmod@ietf.org>; Wed, 30 Jan 2019 02:46:15 -0800 (PST)
Received: by mail-qt1-x835.google.com with SMTP id r14so25743013qtp.1 for <netmod@ietf.org>; Wed, 30 Jan 2019 02:46:15 -0800 (PST)
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=EQUaf2uioHbidA7KgDteYKsd2rtyLIMkvseJIqU3RRc=; b=ql6re8ADGLWlgIywaZZLxJmL8pEE7B+D0XilZYgnrpDYdt/iWTHBNjjofMHLMlR4DZ SG20DzXVo5sv5+debiz25jiIZgO086/arDJMokJKX0EHxTgrkAeNmKdDYtZ7bjaKnZxa pg1/IFwCg/x1CkSG3g+WmLTiLRsYW9fy7gs8rNy3Ha/m0YIoGl898vSJehka4vieabql ubmbJtdmbXrKKvz9Q+WpJiDEgHnVucb3aDKJ8Ugqg3d5qmXOlsP+p8n0s91KzAavD/Ew y0hTgrkZkbzh7t4rrQHNpVXFT51odQebxr4JH3dshGGzs1dSoVPfybXrYA2adDE/I1rb gQxw==
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=EQUaf2uioHbidA7KgDteYKsd2rtyLIMkvseJIqU3RRc=; b=M4VAF1mDQqP7eV88gUtT8JvWtCMb97u9i5VDM4Y9oRb1QEW16l0072J+5cT3RF0zkN t3Q7x5IEMS/RdxlJiRkDMHUMOSrc3pROz0JiYVdMFiKYNQHFaenmJPrV48w3f3VGP3GN 4B0kb6F+jyA2WfBdxY7B93WGF+1AGpI6gcwkUpnjvEvAtZHwbRaXbibeHc7a475Q6mwr poRKs+buVYoDB7rSsM1sfoLm8oTwQzrhqumULAGxDYWPQ1yHYzPtRTEtmTdbRcK2JH2e lI/7iovALLsue74DXLTPR1idZQPhyJsdy2H2dI4YJEr6epnv7SwGbZE5sOjERTHZcd+k rf5Q==
X-Gm-Message-State: AJcUukfLpyEeKEJPr+d6bj+G02eLnCZu7V7kMT80wJzURQiWeqQEvCkN CEExbXcEcdbbmsn0NssYS2FNmdeZUT8ugMVhCXtGZA==
X-Google-Smtp-Source: ALg8bN50/N9ySBJR/Eqd6mMv7+HU1glW+5F/68PIwo8RlrDOA86AFnm+Btjabjx+MtwGspB0vCHLLs5kYAYySMTvJx0=
X-Received: by 2002:a0c:fb4c:: with SMTP id b12mr27559090qvq.177.1548845174363; Wed, 30 Jan 2019 02:46:14 -0800 (PST)
MIME-Version: 1.0
References: <CAKiLt9L2U5Vixxvpto+0EL0gddrsrjPMgKA6phCdVTTuW=WdgA@mail.gmail.com> <20190130.105454.2093696397478614509.mbj@tail-f.com> <CAKiLt9J0GTjGbq8qtw=5gjyyLwAXvJuya0YF_f8GXca94vEARw@mail.gmail.com> <20190130.113556.191284102173613639.mbj@tail-f.com>
In-Reply-To: <20190130.113556.191284102173613639.mbj@tail-f.com>
From: Amar Jadagoud <ammys.vas@gmail.com>
Date: Wed, 30 Jan 2019 16:16:02 +0530
Message-ID: <CAKiLt9LgO0ALvzmy-BJoRqqTvnObk99ottsbqNOaSdA+MHuJ3Q@mail.gmail.com>
To: netmod@ietf.org
Content-Type: multipart/alternative; boundary="0000000000006e1d610580aa9ee8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/J-X5cG_D8vli7EdKNQasbSanuE8>
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 10:46:18 -0000

So do you mean that origin-filter needs to be applied on the response data
but origin annotation should not be provided in the rpc-reply?

On Wed 30 Jan, 2019, 4:05 PM Martin Bjorklund <mbj@tail-f.com wrote:

> Amar Jadagoud <ammys.vas@gmail.com> wrote:
> > Hi Martin,
> >
> > Yes. I got your point. Thanks.
> >
> > One more question :
> >
> > Libyang does not return error if origin-filter is provided in the rpc
> > request without "with-origin" parameter as ietf-netconf-nmda module does
> > not mandate it.
>
> Yes, this is intentional.  "with-origin" is orthogonal from any
> filters.
>
> > So we consider it as with-origin scenario and provide
> > origin annotation in parent and child record.
>
> If the client didn't pass the "with-origin" parameter, the server
> should not fill in the "origin" annotations, even if "origin-filter"
> was passed.
>
>
> /martin
>
>
> > Does below point holds true
> > for this case too?
>
>
>
> >
> > Thanks,
> > Amar
> >
> > On Wed 30 Jan, 2019, 3:24 PM Martin Bjorklund <mbj@tail-f.com wrote:
> >
> > > Hi,
> > >
> > > Amar Jadagoud <ammys.vas@gmail.com> wrote:
> > > > Hi martin,
> > > >
> > > > Yes. I got your point. But what should be the parent record
> annotation
> > > > value? Whether it should be intended or origin annotation itself
> should
> > > not
> > > > exist?
> > >
> > > I'm not sure I understand your question, but if the "with-origin"
> > > parameter is present in the request, the reply will contain "origin"
> > > annotations on all nodes (including ancestors) that have it.  This
> > > handling is separate from any filters included.  So even if you filter
> > > for "system" you might get nodes in the ancestor hierarchy with origin
> > > "intended", if you provided "with-origin".
> > >
> > >
> > > /martin
> > >
> > >
> > >
> > >
> > > >
> > > > Thanks,
> > > > Amar
> > > >
> > > > On Wed 30 Jan, 2019, 2:25 PM Martin Bjorklund <mbj@tail-f.com wrote:
> > > >
> > > > > 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
> > > > >
> > >
>