Re: [YANG] keyref
Martin Bjorklund <mbj@tail-f.com> Mon, 21 January 2008 22:06 UTC
Return-path: <yang-bounces@ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com)
by megatron.ietf.org with esmtp (Exim 4.43)
id 1JH4mG-00005I-UO; Mon, 21 Jan 2008 17:06:00 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43)
id 1JH4mF-0008MO-90
for yang-confirm+ok@megatron.ietf.org; Mon, 21 Jan 2008 17:05:59 -0500
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org)
by megatron.ietf.org with esmtp (Exim 4.43) id 1JH4mE-0008EC-As
for yang@ietf.org; Mon, 21 Jan 2008 17:05:58 -0500
Received: from [213.180.94.162] (helo=mail.tail-f.com)
by chiedprmail1.ietf.org with esmtp (Exim 4.43) id 1JH4mD-0002en-Ii
for yang@ietf.org; Mon, 21 Jan 2008 17:05:58 -0500
Received: from localhost (c213-100-166-13.swipnet.se [213.100.166.13])
by mail.tail-f.com (Postfix) with ESMTP id 6CC0D1B80C5;
Mon, 21 Jan 2008 23:05:56 +0100 (CET)
Date: Mon, 21 Jan 2008 23:04:29 +0100 (CET)
Message-Id: <20080121.230429.148337580.mbj@tail-f.com>
To: ietf@andybierman.com
Subject: Re: [YANG] keyref
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <4794D016.10107@andybierman.com>
References: <4794D016.10107@andybierman.com>
X-Mailer: Mew version 5.1.51 on Emacs 22.1 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.1 (/)
X-Scan-Signature: 386e0819b1192672467565a524848168
Cc: yang@ietf.org
X-BeenThere: yang@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: YANG modeling Language for NETCONF <yang.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/yang>,
<mailto:yang-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www1.ietf.org/pipermail/yang>
List-Post: <mailto:yang@ietf.org>
List-Help: <mailto:yang-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/yang>,
<mailto:yang-request@ietf.org?subject=subscribe>
Errors-To: yang-bounces@ietf.org
Hi Andy, Andy Bierman <ietf@andybierman.com> wrote: > Hi, > > The keyref builtin type is confusing. > It is not very clear why this needs to be a built-in type, It's a type b/c it works as all the other types; you can have a leaf or leaf-list of this type etc. > or why all the various forms are needed. > > What do all these clauses within a leaf mean for a keyref? > - units Not much I think. > - must Same as for other leafs. > - default Same as for other leafs, although it's pretty pointless. > - config Same as for other leafs, except that we don't want to allow a reference from config into non-config (not added to the draft yet). > - mandatory Same as for other leafs. > What does it mean for a keyref leaf to have different values of these clauses > than the leaf for the target of the 'path' statement? See below. > Does a keyref variable always contain the value of the variable > it points to, or not? If not, when? Note that in order to find "the variable it points to", you need the path from the schema, and the value of the keyref leaf. So I guess I don't understand your question. > Can a keyref be status current and the path reference > a leaf that is deprecated or obsolete? Good question. I think that the answer is yes, if the keyref is to another module (since if there is a keyref from module A to module B, and B gets updated, it cannot require A to be updated.) > What are writable keyrefs used for? An example is 'channelIfIndex' from the RMON-MIB. It could have been defined in YANG (ignoring some details about config/non-config) as: leaf channelIfIndex { type keyref { path "/if:interfaces/if:ifEntry/if:ifIndex"; } } The idea is that the keyref formalizes the stuff found in description clauses in mibs: The interface identified by a particular value of this object is the same interface as identified by the same value of the ifIndex object So, writable keyrefs are used to configure relationships. [...] > IMO, this 2nd form is complicated, and I don't really see why WGs > need it, or why they will use it. The simple absolute-schema-nodeid form > makes sense to me, as a mechanism within notifications to reference > config data that is copied into the notification. As soon as the list has more than one leaf as key, you will need this second form. This being said, if anyone can come up with a simpler solution to the problem of having references to multi-keyed lists, it will be more than welcome! /martin _______________________________________________ YANG mailing list YANG@ietf.org https://www1.ietf.org/mailman/listinfo/yang
- [YANG] keyref Andy Bierman
- Re: [YANG] keyref Martin Bjorklund
- Re: [YANG] keyref Andy Bierman
- Re: [YANG] keyref Juergen Schoenwaelder
- Re: [YANG] keyref Martin Bjorklund
- Re: [YANG] keyref Juergen Schoenwaelder
- Re: [YANG] keyref Martin Bjorklund
- Re: [YANG] keyref Juergen Schoenwaelder
- Re: [YANG] keyref Martin Bjorklund
- Re: [YANG] keyref Juergen Schoenwaelder
- Re: [YANG] keyref Martin Bjorklund
- Re: [YANG] keyref Balazs Lengyel
- Re: [YANG] keyref Balazs Lengyel
- RE: [YANG] keyref Bert Wijnen
- Re: [YANG] keyref Andy Bierman
- Re: [YANG] keyref Martin Bjorklund
- Re: [YANG] keyref Andy Bierman
- Re: [YANG] keyref Balazs Lengyel
- Re: [YANG] keyref Andy Bierman
- Re: [YANG] keyref Martin Bjorklund
- Re: [YANG] keyref Juergen Schoenwaelder
- Re: [YANG] keyref Juergen Schoenwaelder
- Re: [YANG] keyref Andy Bierman
- Re: [YANG] keyref Phil Shafer
- Re: [YANG] keyref Andy Bierman
- Re: [YANG] keyref Randy Presuhn
- Re: [YANG] keyref Randy Presuhn
- Re: [YANG] keyref Phil Shafer
- Re: [YANG] keyref Andy Bierman
- Re: [YANG] keyref Martin Bjorklund
- Re: [YANG] keyref Balazs Lengyel
- Re: [YANG] keyref Andy Bierman