Re: [netconf] leafrefed data item in YANG Push

Qin Wu <> Sat, 14 December 2019 14:41 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 6E28612003F for <>; Sat, 14 Dec 2019 06:41:52 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -4.2
X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 8ESUYYpl93IR for <>; Sat, 14 Dec 2019 06:41:49 -0800 (PST)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 396C412003E for <>; Sat, 14 Dec 2019 06:41:49 -0800 (PST)
Received: from (unknown []) by Forcepoint Email with ESMTP id 587C9BEC07F24E0492D0 for <>; Sat, 14 Dec 2019 14:41:45 +0000 (GMT)
Received: from ( by ( with Microsoft SMTP Server (TLS) id 14.3.408.0; Sat, 14 Dec 2019 14:41:44 +0000
Received: from ([]) by ([]) with mapi id 14.03.0439.000; Sat, 14 Dec 2019 22:41:40 +0800
From: Qin Wu <>
To: "Sterne, Jason (Nokia - CA/Ottawa)" <>, "" <>
Thread-Topic: leafrefed data item in YANG Push
Thread-Index: AdWyikmlxR6WSX3TSbeHT7gqZjfMjA==
Date: Sat, 14 Dec 2019 14:41:39 +0000
Message-ID: <>
Accept-Language: zh-CN, en-US
Content-Language: zh-CN
x-originating-ip: []
Content-Type: multipart/alternative; boundary="_000_B8F9A780D330094D99AF023C5877DABAA94FA4E5dggeml511mbxchi_"
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <>
Subject: Re: [netconf] leafrefed data item in YANG Push
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sat, 14 Dec 2019 14:41:52 -0000

Thanks Jason for clarification, 2 leafs associated with each other via leafref can be defined in the same module, can be defined in two separate modules (see example module below),
I am wondering whether these two cases are treated by the server in the same way.
RFC8639 provides a dependency parameter to describe the relationship between two subscriptions, I am wondering whether this dependency parameter is designed to address
the case where two leafs are associated with each other via leafref in two different modules. Take the below modules as an example,
We may have two subscriptions, one subscription A  is used to subscribed to leaf aa in module foo, the other subscription  B is used to subscribed to leaf cc and bb in module bar. So  the subscription A
will use dependency parameter to indicate leaf bb is associated with leaf aa in subscription B, right?

If the answer is no, what is the real case for dependency parameter defined in RFC8639?

发件人: Sterne, Jason (Nokia - CA/Ottawa) []
发送时间: 2019年12月14日 3:20
收件人: Qin Wu <>;;
主题: RE: leafrefed data item in YANG Push

Hi Qin,

For subscriptions, I don't think it matters if 2 leafs are associated with each other via a leafref.  When you subscribe to each of those leafs, it is just like subscribing to any other 2 leafs (that aren't associated with eachother).

About the 'dangling reference': that should be accepted into the running datastore. It would fail validation. So it can only exist in the candidate.


From: netconf <<>> On Behalf Of Qin Wu
Sent: Thursday, December 12, 2019 11:09 PM
Subject: [netconf] leafrefed data item in YANG Push

Can I subscribe to specific data item that refer to data item in another YANG module with other data item in the same subscription?
Module bar {
import foo {prefix ex;}
     leaf cc{type int8;}
     leaf bb {
       type leafref {
         path "../ex:aa";

Module foo {
     leaf aa {
       type int8;
In addition, If there is dangling reference, e.g., leaf bb refer to leaf aa which doesn’t exist, how this failure is handled by the server
and exposed to the client?