Re: [YANG] keyref
Balazs Lengyel <balazs.lengyel@ericsson.com> Tue, 22 January 2008 13:50 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 1JHJWY-0000KK-1x; Tue, 22 Jan 2008 08:50:46 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43)
id 1JHJWW-0000KA-NX
for yang-confirm+ok@megatron.ietf.org; Tue, 22 Jan 2008 08:50:44 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org)
by megatron.ietf.org with esmtp (Exim 4.43) id 1JHJWW-0000JD-DQ
for yang@ietf.org; Tue, 22 Jan 2008 08:50:44 -0500
Received: from mailgw4.ericsson.se ([193.180.251.62])
by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1JHJWO-0001yk-4R
for yang@ietf.org; Tue, 22 Jan 2008 08:50:44 -0500
Received: from mailgw4.ericsson.se (unknown [127.0.0.1])
by mailgw4.ericsson.se (Symantec Mail Security) with ESMTP id
59DDD20175; Tue, 22 Jan 2008 14:50:15 +0100 (CET)
X-AuditID: c1b4fb3e-acdecbb0000007e1-52-4795f497eb3b
Received: from esealmw126.eemea.ericsson.se (unknown [153.88.254.123])
by mailgw4.ericsson.se (Symantec Mail Security) with ESMTP id
4B38921147; Tue, 22 Jan 2008 14:50:15 +0100 (CET)
Received: from esealmw126.eemea.ericsson.se ([153.88.254.174]) by
esealmw126.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830);
Tue, 22 Jan 2008 14:50:15 +0100
Received: from [159.107.197.224] ([159.107.197.224]) by
esealmw126.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830);
Tue, 22 Jan 2008 14:50:14 +0100
Message-ID: <4795F496.7040309@ericsson.com>
Date: Tue, 22 Jan 2008 14:50:14 +0100
From: Balazs Lengyel <balazs.lengyel@ericsson.com>
User-Agent: Thunderbird 2.0.0.4 (X11/20070604)
MIME-Version: 1.0
To: Martin Bjorklund <mbj@tail-f.com>
Subject: Re: [YANG] keyref
References: <4794D016.10107@andybierman.com>
<20080121.230429.148337580.mbj@tail-f.com>
In-Reply-To: <20080121.230429.148337580.mbj@tail-f.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 22 Jan 2008 13:50:14.0929 (UTC)
FILETIME=[B7267010:01C85CFD]
X-Brightmail-Tracker: AAAAAA==
X-Spam-Score: -1.0 (-)
X-Scan-Signature: a7d6aff76b15f3f56fcb94490e1052e4
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
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.
Balazs
Martin Bjorklund wrote:
> 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
--
Balazs Lengyel Ericsson Hungary Ltd.
TSP System Manager
ECN: 831 7320 Fax: +36 1 4377792
Tel: +36-1-437-7320 email: Balazs.Lengyel@ericsson.com
_______________________________________________
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