Re: [netconf] leafrefed data item in YANG Push

Qin Wu <bill.wu@huawei.com> Wed, 18 December 2019 01:34 UTC

Return-Path: <bill.wu@huawei.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7D678120073 for <netconf@ietfa.amsl.com>; Tue, 17 Dec 2019 17:34:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.201
X-Spam-Level:
X-Spam-Status: No, score=-4.201 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 zUruD9-VPAqk for <netconf@ietfa.amsl.com>; Tue, 17 Dec 2019 17:34:45 -0800 (PST)
Received: from huawei.com (lhrrgout.huawei.com [185.176.76.210]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 70ABE120043 for <netconf@ietf.org>; Tue, 17 Dec 2019 17:34:45 -0800 (PST)
Received: from lhreml706-cah.china.huawei.com (unknown [172.18.7.107]) by Forcepoint Email with ESMTP id 2FF2589A850D5DAD43A0; Wed, 18 Dec 2019 01:34:43 +0000 (GMT)
Received: from lhreml721-chm.china.huawei.com (10.201.108.72) by lhreml706-cah.china.huawei.com (10.201.108.47) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 18 Dec 2019 01:34:43 +0000
Received: from lhreml721-chm.china.huawei.com (10.201.108.72) by lhreml721-chm.china.huawei.com (10.201.108.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 18 Dec 2019 01:34:42 +0000
Received: from DGGEML406-HUB.china.huawei.com (10.3.17.50) by lhreml721-chm.china.huawei.com (10.201.108.72) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.1.1713.5 via Frontend Transport; Wed, 18 Dec 2019 01:34:42 +0000
Received: from DGGEML511-MBX.china.huawei.com ([169.254.1.39]) by dggeml406-hub.china.huawei.com ([10.3.17.50]) with mapi id 14.03.0439.000; Wed, 18 Dec 2019 09:34:39 +0800
From: Qin Wu <bill.wu@huawei.com>
To: Martin Bjorklund <mbj@tail-f.com>
CC: "jason.sterne@nokia.com" <jason.sterne@nokia.com>, "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [netconf] leafrefed data item in YANG Push
Thread-Index: AdW1QZoZRKi9i69nQbyATo6Q8uMhYg==
Date: Wed, 18 Dec 2019 01:34:39 +0000
Message-ID: <B8F9A780D330094D99AF023C5877DABAA9500CAD@dggeml511-mbx.china.huawei.com>
Accept-Language: zh-CN, en-US
Content-Language: zh-CN
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.134.31.203]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/16nKEQjY9HqNjCX2htV6BjKiRrM>
Subject: Re: [netconf] leafrefed data item in YANG Push
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Dec 2019 01:34:47 -0000

Thanks Martin for clarification, I understand the dependency between subscription is different from dependency between two leafs.
But still not clear what is the real case for dependency? Should parent subscription and child subscription point to same leafs in the 
same modules requested by the same subscriber?
If not, how a set of data defined by parent subscription and child subscription are put together? Is this related to object correlation?

-Qin
-----邮件原件-----
发件人: Martin Bjorklund [mailto:mbj@tail-f.com] 
发送时间: 2019年12月16日 16:33
收件人: Qin Wu <bill.wu@huawei.com>
抄送: jason.sterne@nokia.com; netconf@ietf.org
主题: Re: [netconf] leafrefed data item in YANG Push

Hi,

Qin Wu <bill.wu@huawei.com> wrote:
> 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.

Yes they are, in the sense that a leafref is not treated different than e.g. a string by the  YANG Push server.

> 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?

No the dependency parameter is not used by a subscriber to "indicate"
(to whom?) that two leafs are associated.

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

From RFC 8639, section 2.3:

   If a subscription has the "dependency" parameter set, then any
   buffered notification messages containing event records selected by
   the parent subscription MUST be dequeued prior to the notification
   messages of the dependent subscription.

It it used to control the order in which the notifications are sent.


/martin



> 
> -Qin
> 发件人: Sterne, Jason (Nokia - CA/Ottawa) [mailto:jason.sterne@nokia.com]
> 发送时间: 2019年12月14日 3:20
> 收件人: Qin Wu <bill.wu@huawei.com>; netconf@ietf.org
> 主题: 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.
> 
> Jason
> 
> From: netconf
> <netconf-bounces@ietf.org<mailto:netconf-bounces@ietf.org>> On Behalf 
> Of Qin Wu
> Sent: Thursday, December 12, 2019 11:09 PM
> To: netconf@ietf.org<mailto:netconf@ietf.org>
> Subject: [netconf] leafrefed data item in YANG Push
> 
> Hello:
> 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?
> 
> -Qin