Re: [netmod] [Netconf] Retrieving Information Pointed by leafref

Robert Wilton <rwilton@cisco.com> Mon, 09 October 2017 14:46 UTC

Return-Path: <rwilton@cisco.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 5EE5E1342D1; Mon, 9 Oct 2017 07:46:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.5
X-Spam-Level:
X-Spam-Status: No, score=-14.5 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.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 8BbHsTD-ouLd; Mon, 9 Oct 2017 07:46:09 -0700 (PDT)
Received: from aer-iport-3.cisco.com (aer-iport-3.cisco.com [173.38.203.53]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 18829134520; Mon, 9 Oct 2017 07:46:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=23331; q=dns/txt; s=iport; t=1507560367; x=1508769967; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to; bh=PeqmHqHEo4wzGwWA3YGKGzsHeMjGerXRjqjzBqdOA0Y=; b=R5KIl1Uw2LWt3wN3MbE+ew2wvRmlQo8ZAQM4A9W5GY6EsYbryBjKw79k 7npxjuIlzWF6gS24pxwv9L9AKrCUsgJdIhdB6ScNJ4uUeU5KgcnXo/xpy 9nDHvHteWCt0oXTahcMTdWWqHqphBiz8Yw85a/7M3Z2JB/NDU7CmJKYpf 0=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CPAACbittZ/xbLJq1dGQEBAQEBAQEBA?= =?us-ascii?q?QEBBwEBAQEBgm9BgRFuJ44ZdJBGK3mHTI1qghIKGAEKgV6Ca08ChHUYAQIBAQE?= =?us-ascii?q?BAQEBayiFGAEBAQECAQEBJQZBCwULCxEDAQEBASAHByEGHwkIBgEMBgIBAYoUA?= =?us-ascii?q?w0IEKl5OieHFQ2DVgEBAQEBAQEBAQEBAQEBAQEBAQEBARgFgy2DU4FqK4JJNYJ?= =?us-ascii?q?eghA2FoU+BZFAjzk8h16IEIR5i12HLox0gQmHXYE5HziBDjIhCB0VSYUaHIFoP?= =?us-ascii?q?zYBAYloAQEB?=
X-IronPort-AV: E=Sophos;i="5.42,500,1500940800"; d="scan'208,217";a="656250473"
Received: from aer-iport-nat.cisco.com (HELO aer-core-1.cisco.com) ([173.38.203.22]) by aer-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2017 14:46:04 +0000
Received: from [10.63.23.63] (dhcp-ensft1-uk-vla370-10-63-23-63.cisco.com [10.63.23.63]) by aer-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id v99Ek47S018009; Mon, 9 Oct 2017 14:46:04 GMT
To: Xufeng Liu <xufeng.liu.ietf@gmail.com>, "'Igor Bryskin'" <Igor.Bryskin@huawei.com>, per@tail-f.com
Cc: netconf@ietf.org, netmod@ietf.org
References: <033601d33ee7$bd359810$37a0c830$@gmail.com> <eac8b96e-227b-347f-9c02-81718918ed08@tail-f.com> <etPan.59da9a33.12305c3a.3f7f@localhost> <etPan.59daaeb6.6daf0f5d.4ba3@localhost> <049501d34104$6aa46670$3fed3350$@gmail.com>
From: Robert Wilton <rwilton@cisco.com>
Message-ID: <a9c8472c-c203-fbe9-11d2-d8508fa5bf79@cisco.com>
Date: Mon, 9 Oct 2017 15:46:04 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0
MIME-Version: 1.0
In-Reply-To: <049501d34104$6aa46670$3fed3350$@gmail.com>
Content-Type: multipart/alternative; boundary="------------F86C82F1B87D48DBEC56326C"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/-2H7_O8727OX86E3ZbjqkQ-6YCE>
Subject: Re: [netmod] [Netconf] Retrieving Information Pointed by leafref
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: Mon, 09 Oct 2017 14:46:12 -0000

I'm not sure that my XPath foo is good enough, but would NETCONF's XPath 
filter solve this problem?

Thanks,
Rob


On 09/10/2017 14:42, Xufeng Liu wrote:
>
> Hi Per,
>
> *From:* Igor Bryskin [mailto:Igor.Bryskin@huawei.com]
> *Sent:* Sunday, October 8, 2017 7:04 PM
> *To:* Igor Bryskin <Igor.Bryskin@huawei.com>om>; per@tail-f.com; 
> xufeng.liu.ietf@gmail.com
> *Cc:* netconf@ietf.org; netmod@ietf.org
> *Subject:* Re: [Netconf] [netmod] Retrieving Information Pointed by 
> leafref
>
>
> Hi Joel,
>
> Thanks, I think I didnt explain our problem correctly.
>
> In our case we have a leafref pointing to a te tunnel name, which 
> happens to be a key to lookup the (axilary) tunnel.  We need  a way to 
> include the entire tunnel body (not just a name) into the get 
> response. This is to optimize the number of iterations between the 
> client and the server. As Xufeng put it something similar to SQL join,
>
> Igor
>
> *From:*Igor Bryskin
>
> *To:*per@tail-f.com,xufeng.liu.ietf@gmail.com,
>
> *Cc:*netconf@ietf.org,netmod@ietf.org,
>
> *Date:*2017-10-08 17:36:47
>
> *Subject:*Re: [Netconf] [netmod] Retrieving Information Pointed by leafref
>
> Hi Per,
>
> In a nutshell we would lika for a netconf client to have a way  to 
> instruct the server on whether in response to the get request the 
> server needs to provide the entire body of a datastore node pointed to 
> by a leafref or just a pointer to said node, so that the node's body 
> could be retrieved by a subsequent separate request. This is requested 
> by implementors who want to optimise rhe number of interactions 
> between a client and its server.
>
> Cheers,
> Igor
>
> *From:*Per Hedeland
>
> *To:*Xufeng Liu,
>
> *Cc:*netconf@ietf.org,'NetMod WG',
>
> *Date:*2017-10-08 14:01:27
>
> *Subject:*Re: [Netconf] [netmod] Retrieving Information Pointed by leafref
>
> On 2017-10-06 23:11, Xufeng Liu wrote:
> > During the design team discussion for TE and MPLS YANG modeling, we 
> have received a request from implementers: How to minimize the number 
> of NETCONF/RESTCONF RPCs to improve operation efficiency?
> > Especially for the case when the operator or client software needs 
> to retrieve the object contents pointed by a leafref.
> >
> > For example, given the following simplified TE tunnel model,
> >
> > +--rw te
> >
> >      +--rw explicit-paths
> >
> >      |  +--rw explicit-path* [name]
> >
> >      |     +--rw name                      string
> >
> >      |        +--rw explicit-route-object* [index]
> >
> >      |           +--rw index uint32
> >
> >      |           +--rw explicit-route-usage? identityref
> >
> >      +--rw tunnels
> >
> >      |  +--rw tunnel* [name]
> >
> >      |  |  +--rw name                   string
> >
> >      |  |  +--rw paths
> >
> >      |  |  |  +--rw path* [name]
> >
> > |  |  |     +--rw explicit-path?  -> 
> ../../../../../explicit-paths/explicit-path/name
> >
> > when the client tries to retrieve a tunnels information based on the 
> tunnel name, the get operation returns a list of leafrefs pointing to 
> the paths of the tunnel.
>
> Sorry, I'm afraid I don't follow. Can you explain exactly what your
> "get" request is (protocol and payload), and where the "list of
> leafref's" (whatever that may be) occurs in the reply?
>
> */[Xufeng]  The “get” operation is the NETCONF/RESTCON <get> protocol 
> operation, or the <get-data> operation described in 
> https://tools.ietf.org/html/draft-dsdt-nmda-netconf-01 and the GET 
> operations on {+restconf}/ds/<datastore> described in 
> https://tools.ietf.org/html/draft-ietf-netconf-nmda-restconf-00./*
>
> *//*
>
> */We have a list of leafref values because in this example model, each 
> tunnel contains a list of paths, each of them contains a leafref. The 
> “get” returns a value for each instance of such a leafref, which (as a 
> string value) will be used as a constraint (foreign key) to retrieve 
> the instance of an explicit-path in the model above./*
>
>
>
> JFYI, in case there is some fundamental misunderstanding here: a leaf of
> type leafref has a single value - *one* of those that satisfy the leafref
> constraint, in case there are multiple "candidates".
>
> --Per
>
> > The client needs to issue at
> > least one more get operation to retrieve the path information about 
> the given tunnel. The request is to combine these two operations into one.
> >
> > In the RDBMS SQL world, join can be used when SQL select is 
> performed, but NETCONF/YANG currently does not have this capability.
> >
> > Wed like to ask whether such a request is considered reasonable.
> >
> > If the request is reasonable, the next question is how to proceed. 
> This seems to be a protocol issue rather than YANG modeling issue. Is 
> it acceptable to add a new operation to achieve such a
> > <get-data> operation with expanded leafrefs?
> >
> > Comments and suggestions are appreciated.
> >
> > Thanks,
> >
> > - Xufeng
> >
> >
> >
> > _______________________________________________
> > netmod mailing list
> > netmod@ietf.org <mailto:netmod@ietf.org>
> > https://www.ietf.org/mailman/listinfo/netmod
> >
>
> _______________________________________________
> Netconf mailing list
> Netconf@ietf.org <mailto:Netconf@ietf.org>
> https://www.ietf.org/mailman/listinfo/netconf
>
>
>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod