Re: [YANG] keyref
Andy Bierman <ietf@andybierman.com> Wed, 23 January 2008 14:17 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 1JHgQ5-0003Sx-KP; Wed, 23 Jan 2008 09:17:37 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43)
id 1JHgQ4-0003Sg-Bs
for yang-confirm+ok@megatron.ietf.org; Wed, 23 Jan 2008 09:17:36 -0500
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org)
by megatron.ietf.org with esmtp (Exim 4.43) id 1JHgQ3-0003SQ-2U
for yang@ietf.org; Wed, 23 Jan 2008 09:17:35 -0500
Received: from smtp112.sbc.mail.re2.yahoo.com ([68.142.229.93])
by chiedprmail1.ietf.org with smtp (Exim 4.43) id 1JHgQ2-0008El-KM
for yang@ietf.org; Wed, 23 Jan 2008 09:17:34 -0500
Received: (qmail 10057 invoked from network); 23 Jan 2008 14:17:33 -0000
Received: from unknown (HELO ?192.168.0.10?) (andybierman@att.net@68.120.83.75
with plain)
by smtp112.sbc.mail.re2.yahoo.com with SMTP; 23 Jan 2008 14:17:33 -0000
X-Yahoo-Newman-Property: ymail-3
Message-ID: <47974CE3.6050509@andybierman.com>
Date: Wed, 23 Jan 2008 06:19:15 -0800
From: Andy Bierman <ietf@andybierman.com>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
To: Martin Bjorklund <mbj@tail-f.com>
Subject: Re: [YANG] keyref
References: <4796C299.7010706@andybierman.com> <200801230521.m0N5LFGR019757@idle.juniper.net>
<20080123.100501.15118771.mbj@tail-f.com>
In-Reply-To: <20080123.100501.15118771.mbj@tail-f.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Scan-Signature: c1c65599517f9ac32519d043c37c5336
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
Martin Bjorklund wrote: > Phil Shafer <phil@juniper.net> wrote: >>> I already made a proposal -- instead of a builtin type called keyref >>> there would be an optional clause for a leaf of leaf-list called >>> leafref that has the path-stmt from the keyref as its argument. >> Your proposal called this a "documentation clause", which implies >> something targeted to humans and not usable by software. This >> would be bad, but I would live with a distinct statement for the >> ref target that is a formal target. > > Why is formal redundancy good? If you're using a leafref, the type is > well known; it is the type if the target node. But you still have to > specify it again. I assume that it would be an error to say that the > leaf is of type int32, but the leafref points to a string leaf. This > also brings up the question when two types are considered to be equal. > The type is not 'well known'. There is a cryptic Xpath expression that contains many prefixes and names. The DM reader first has to understand the Xpath to pick the right one, then go to the top of the file and scan all the import statements to find the module for that prefix, then find that module, then find the correct leaf object within it. If the desired leaf came from a uses expansion, then the object will not be where the Xpath says it is, so all the groupings for all the uses-stmts need to be tracked down and checked. (If the nested leaf is called 'name', or something else generic, good luck finding it with grep.) After all this detective work, the leaf is found, and the DM writer finds the name of the data type for the original leaf. Or the type field in the original leaf could specify this data type and an additional leafref clause can be used by a machine to track down the additional details. IMO this is not formal redundancy from the POV of the DM reader. Maybe it is to a YANG compiler, but the DM reader is top of the food chain here. > > /martin > > Andy _______________________________________________ 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