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

Igor Bryskin <> Sun, 08 October 2017 23:04 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 58CFD132F76; Sun, 8 Oct 2017 16:04:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -4.219
X-Spam-Status: No, score=-4.219 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id N94368T-KH0u; Sun, 8 Oct 2017 16:04:02 -0700 (PDT)
Received: from ( []) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id EEF341330BF; Sun, 8 Oct 2017 16:04:01 -0700 (PDT)
Received: from (EHLO ([]) by (MOS 4.3.7-GA FastPath queued) with ESMTP id DQD20206; Sun, 08 Oct 2017 23:03:59 +0000 (GMT)
Received: from ( by ( with Microsoft SMTP Server (TLS) id 14.3.301.0; Mon, 9 Oct 2017 00:03:58 +0100
Received: from ([]) by ([]) with mapi id 14.03.0301.000; Sun, 8 Oct 2017 16:03:40 -0700
From: Igor Bryskin <>
To: Igor Bryskin <>, "" <>, "" <>
CC: "" <>, "" <>
Thread-Topic: [Netconf] [netmod] Retrieving Information Pointed by leafref
Thread-Index: AdM+52gw6QWX/3ijR4GeNhdOmHSt/gBsqhSA///GxXmAABh1KA==
Date: Sun, 08 Oct 2017 23:03:39 +0000
Message-ID: <etPan.59daaeb6.6daf0f5d.4ba3@localhost>
References: <033601d33ee7$bd359810$37a0c830$>, <>, <etPan.59da9a33.12305c3a.3f7f@localhost>
In-Reply-To: <etPan.59da9a33.12305c3a.3f7f@localhost>
Accept-Language: en-US
Content-Language: en-US
Content-Type: multipart/alternative; boundary="_000_etPan59daaeb66daf0f5d4ba3localhost_"
MIME-Version: 1.0
X-CFilter-Loop: Reflected
X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A0B0206.59DAAEE0.0031, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32
X-Mirapoint-Loop-Id: f33fc7b725f35566479b73ba291ab56a
Archived-At: <>
Subject: Re: [netmod] [Netconf] Retrieving Information Pointed by leafref
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NETMOD WG list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sun, 08 Oct 2017 23:04:05 -0000

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,

From:Igor Bryskin,,,,
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.

From:Per Hedeland
To:Xufeng Liu,,'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?

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".


> 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

Netconf mailing list