Re: [YANG] keyref
Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Tue, 22 January 2008 07:58 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 1JHE1T-00071b-Oi; Tue, 22 Jan 2008 02:58:19 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43)
id 1JHE1S-00071V-7s
for yang-confirm+ok@megatron.ietf.org; Tue, 22 Jan 2008 02:58:18 -0500
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org)
by megatron.ietf.org with esmtp (Exim 4.43) id 1JHE1K-0006qc-Rd
for yang@ietf.org; Tue, 22 Jan 2008 02:58:10 -0500
Received: from hermes.jacobs-university.de ([212.201.44.23])
by chiedprmail1.ietf.org with esmtp (Exim 4.43) id 1JHE1J-0000b8-M8
for yang@ietf.org; Tue, 22 Jan 2008 02:58:10 -0500
Received: from localhost (demetrius.jacobs-university.de [212.201.44.32])
by hermes.jacobs-university.de (Postfix) with ESMTP id 05F4C8A3E6;
Tue, 22 Jan 2008 08:58:08 +0100 (CET)
Received: from hermes.jacobs-university.de ([212.201.44.23])
by localhost (demetrius.jacobs-university.de [212.201.44.32])
(amavisd-new, port 10024)
with ESMTP id 14496-07; Tue, 22 Jan 2008 08:58:03 +0100 (CET)
Received: from elstar.local (elstar.iuhb02.iu-bremen.de [10.50.231.133])
by hermes.jacobs-university.de (Postfix) with ESMTP id C9D548A37C;
Tue, 22 Jan 2008 08:58:02 +0100 (CET)
Received: by elstar.local (Postfix, from userid 501)
id 4E70B477992; Tue, 22 Jan 2008 08:58:01 +0100 (CET)
Date: Tue, 22 Jan 2008 08:58:01 +0100
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Andy Bierman <ietf@andybierman.com>
Subject: Re: [YANG] keyref
Message-ID: <20080122075801.GA5155@elstar.local>
Mail-Followup-To: Andy Bierman <ietf@andybierman.com>,
Martin Bjorklund <mbj@tail-f.com>, yang@ietf.org
References: <4794D016.10107@andybierman.com>
<20080121.230429.148337580.mbj@tail-f.com>
<47954F24.905@andybierman.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <47954F24.905@andybierman.com>
User-Agent: Mutt/1.5.17 (2007-11-01)
X-Virus-Scanned: amavisd-new 2.3.3 (20050822) at jacobs-university.de
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 50a516d93fd399dc60588708fd9a3002
Cc: yang@ietf.org
X-BeenThere: yang@ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: j.schoenwaelder@jacobs-university.de
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
On Mon, Jan 21, 2008 at 06:04:20PM -0800, Andy Bierman wrote: > I don't see the use case for writable keyrefs. > When you read the object the first time, it has the value > from the ptarh target, and when you set the keyref leaf, > it has the new value and no longer is a reference to the key leaf. > Then it changes back to a reference if the manager deletes the > keyref leaf? I don't think this is how a keyref works according to my understanding of this thing. > IMO, this should be just another documentation clause, added to a > leaf like the current 'description' and 'reference'. I don't > understand why this is a data type. My understanding is that a keyref type essentially says "this leaf contains a value that is consistent with the type and the semantics of the leaf identified by the attached expression". In SMIv2, we did not have such a mechanism and we used conventions to achieve the same, that is we ended up with TC such as InterfaceIndex that were then usually used for objects that contain values identifying and interface. The keyref mechanism (which I think should be a leafref or something like that since not only keys need to be referenced) allows to make it machine readable who refering to whom, which in the SMIv2 world is not machine readable and thus tools have to resort to heuristics to best guess this information. Of course, there are several aspects here to discuss. First of all, do we need to have machine readable information about who is refering to whom. If so, is a keyref^Hleafref type the correct approach or should this be handled by introducing say a leafref statement. The next question then is whether we want keyrefs^Hleafrefs to maintain consistency with the leaf they are pointing to. In some cases, this will be really useful, in other it might not. Taking the interface example, sometimes I really like to refer to interface #3 regardless how interface #3 is used while in other cases I really like to refer to an interface that has a certain purpose, regardless in which port it happens to be. So I think we would have to support multiple needed semantics - and sometimes these might actually be deployment specific and perhaps reach beyond what is needed in YANG 1.0. /js -- Juergen Schoenwaelder Jacobs University Bremen gGmbH Phone: +49 421 200 3587 Campus Ring 1, 28759 Bremen, Germany Fax: +49 421 200 3103 <http://www.jacobs-university.de/> _______________________________________________ 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