Re: [YANG] keyref

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Tue, 22 January 2008 21:55 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 1JHR5e-0002Xp-Ib; Tue, 22 Jan 2008 16:55:30 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43) id 1JHR5e-0002Xk-4c for yang-confirm+ok@megatron.ietf.org; Tue, 22 Jan 2008 16:55:30 -0500
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JHR5d-0002Xc-Pb for yang@ietf.org; Tue, 22 Jan 2008 16:55:29 -0500
Received: from hermes.jacobs-university.de ([212.201.44.23]) by chiedprmail1.ietf.org with esmtp (Exim 4.43) id 1JHR5d-0004YO-8R for yang@ietf.org; Tue, 22 Jan 2008 16:55:29 -0500
Received: from localhost (demetrius.jacobs-university.de [212.201.44.32]) by hermes.jacobs-university.de (Postfix) with ESMTP id C77888A238; Tue, 22 Jan 2008 22:55:27 +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 00842-08; Tue, 22 Jan 2008 22:55:23 +0100 (CET)
Received: from elstar.local (elstar.iuhb02.iu-bremen.de [10.50.231.133]) by hermes.jacobs-university.de (Postfix) with ESMTP id 7CB648A2E0; Tue, 22 Jan 2008 22:55:22 +0100 (CET)
Received: by elstar.local (Postfix, from userid 501) id D5D9F479031; Tue, 22 Jan 2008 22:55:20 +0100 (CET)
Date: Tue, 22 Jan 2008 22:55:20 +0100
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Balazs Lengyel <balazs.lengyel@ericsson.com>
Subject: Re: [YANG] keyref
Message-ID: <20080122215520.GA6901@elstar.local>
Mail-Followup-To: Balazs Lengyel <balazs.lengyel@ericsson.com>, Martin Bjorklund <mbj@tail-f.com>, yang@ietf.org
References: <4794D016.10107@andybierman.com> <20080121.230429.148337580.mbj@tail-f.com> <4795F496.7040309@ericsson.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4795F496.7040309@ericsson.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: 52e1467c2184c31006318542db5614d5
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 Tue, Jan 22, 2008 at 02:50:14PM +0100, Balazs Lengyel wrote:
> In the Ericsson DML we had something like
>
> leaf my-if-status> {
>   type instance-identifier {
>     refers-to /if:interfaces/if:ifEntry/adminStatus;
>   }
> }
>
> and in the XML
>
>   <myIfStatus>/if:interfaces/if:ifEntry["if:ifIndex=2"]/adminStatus</myIfStatus>
>
> This is quite simple, it works as a leafref as well, and works with 
> multiple keys. refers-to restricts the kind of instance identifiers you can 
> actually use. The actual XML value is somewhat more complicated, but I 
> think the instance identifier format is quite intuitive even for people 
> unfamiliar with XPATH.

It is actually unclear to me what the example does. I get back an
xpath expression that points to some other object to consult? I
believe this is not really the same as the current keyref and this
also raises questions related to referential integrity or what if the
expression actually refers to a node set with more than 1 node and
similar things. I am also not sure management applications and humans
like to extrace the ifIndex value 2 out of the expression. And then
there is the question why to ship redundant information at run time if
it is already hard wired in the scheme? What happens if the expression
is not consistent with refers-to?

/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