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

Amar Jadagoud <ammys.vas@gmail.com> Wed, 30 January 2019 10:26 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 74942130F3A for <netmod@ietfa.amsl.com>; Wed, 30 Jan 2019 02:26:27 -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 44MXg6WbwJrT for <netmod@ietfa.amsl.com>; Wed, 30 Jan 2019 02:26:25 -0800 (PST)
Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) (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 04878130F28 for <netmod@ietf.org>; Wed, 30 Jan 2019 02:26:24 -0800 (PST)
Received: by mail-qt1-x82d.google.com with SMTP id v11so25638038qtc.2 for <netmod@ietf.org>; Wed, 30 Jan 2019 02:26:24 -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=ckUyvpQJOb9W6TTbmCfDwClOViaFPnoZNGkR0AkG2Yg=; b=VB60ONu6TQCWdppBG6rNjKkmnnmJtDPsbOOOVYyKyevbJGl8roh1D506BZseC/isS6 e4lvmXTI3DmHqC7VhHKK5O0u1wsPvVPF56/jBPGymCF3G6pK3Z2e6sBR9nfAWW44igtr Jr4XQVqOqYH8Fyn9h9oSyJk9rC75jIM7ZTRc+ETsnx7XKqpE4hzys4EzCEAD/Vx1kOkK jwDfEwrPCNoglVCs+k/aHv4299CSp6ZG8MBQSKmJPJgkUbBqKmV8D2VBKxtKWgTcDSwk QqX1EqVtQmCDr8HRr2YiTF3MQ2lakHLRV+h8EPqrqyfFJVK3EDBZWYOfBFSS/rmETSbr y3tg==
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=ckUyvpQJOb9W6TTbmCfDwClOViaFPnoZNGkR0AkG2Yg=; b=FTnwdAph0dp+vvEIAbtHtioZFP1bTyxNazuWRw9TUeFfAGwefkk0v8436xUvtqm/vp lG0VJl9EmX26pfSc7gzjmgZ/8hO0hfH1hCR8ksxORHnCbsPojrWoKfOX7b9VZJDQ8oZi SnfHYQTRl2VtcQeCzpxfRPs1KbbNS2AeLVjx/6WuNqv3HT/nQlcYi/yE4gTFmosUsk4f FXZd0938wYYuZxx+hplqKCqOx8td+qqmVaPFFDxkVVuXluNjFjHOkW1SQZr7Km4ZD5IQ 3KA95Cxctogjswov7Ef91XuMa+TiRkLZk2VLHFwV4F/i9Z4SUtgpIYJLoraqJVth0m3n eJXg==
X-Gm-Message-State: AJcUukcL1gxc6ZAGV3xW+DoER9ItDi83kqrXlFHAMjxr4b0LhLHe7L13 JR2fFHeW/0tldPEMrUUbLeUPPSzyqN5QFdhcZlwRAg==
X-Google-Smtp-Source: ALg8bN4+KuwOJTd/u7aQArKHqprNePSJ7NWzsCQ3ngHYiPlBnkQq7Rsd+XFQ1aOYRzRKC19DNtem37zhwu31YtXsW1w=
X-Received: by 2002:a0c:fb4c:: with SMTP id b12mr27507439qvq.177.1548843983624; Wed, 30 Jan 2019 02:26:23 -0800 (PST)
MIME-Version: 1.0
References: <CAKiLt9+Fo8ysaAo3AE8wdDnvL6QY_+kytM1xqCQOxX4GG1Z78g@mail.gmail.com> <20190130.095558.1264661153680469484.mbj@tail-f.com> <CAKiLt9L2U5Vixxvpto+0EL0gddrsrjPMgKA6phCdVTTuW=WdgA@mail.gmail.com> <20190130.105454.2093696397478614509.mbj@tail-f.com>
In-Reply-To: <20190130.105454.2093696397478614509.mbj@tail-f.com>
From: Amar Jadagoud <ammys.vas@gmail.com>
Date: Wed, 30 Jan 2019 15:56:12 +0530
Message-ID: <CAKiLt9J0GTjGbq8qtw=5gjyyLwAXvJuya0YF_f8GXca94vEARw@mail.gmail.com>
To: netmod@ietf.org
Content-Type: multipart/alternative; boundary="00000000000074df000580aa5798"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/zEU0Cbx9PzKGnN6oGZ6YAvsw8xw>
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:26:27 -0000

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. So we consider it as with-origin scenario and provide
origin annotation in parent and child record. 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
> > >
>