Re: [YANG] key clause issues
Martin Bjorklund <mbj@tail-f.com> Tue, 08 January 2008 11:12 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 1JCCNl-0004Uh-8H; Tue, 08 Jan 2008 06:12:33 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43)
id 1JCCNj-0004Ub-Q3
for yang-confirm+ok@megatron.ietf.org; Tue, 08 Jan 2008 06:12:31 -0500
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org)
by megatron.ietf.org with esmtp (Exim 4.43) id 1JCCNj-0004UT-F8
for yang@ietf.org; Tue, 08 Jan 2008 06:12:31 -0500
Received: from [213.180.94.162] (helo=mail.tail-f.com)
by chiedprmail1.ietf.org with esmtp (Exim 4.43) id 1JCCNi-00088s-P5
for yang@ietf.org; Tue, 08 Jan 2008 06:12:31 -0500
Received: from localhost (c213-100-166-13.swipnet.se [213.100.166.13])
by mail.tail-f.com (Postfix) with ESMTP id F14871B80DA;
Tue, 8 Jan 2008 12:12:28 +0100 (CET)
Date: Tue, 08 Jan 2008 12:11:47 +0100 (CET)
Message-Id: <20080108.121147.221068658.mbj@tail-f.com>
To: ietf@andybierman.com
Subject: Re: [YANG] key clause issues
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <4782C606.5010109@andybierman.com>
References: <4782C606.5010109@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: 7fa173a723009a6ca8ce575a65a5d813
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: > Issue 1) > > From an interoperability perspective, the key needs to > be defined any time there are multiple named instances > of an element (i.e., every list). Exactly what will not be interoperable by not having keys for non-config data? (One problem might be how to define access control. W/o keys you might have to fall back to generic XPath, which we want to avoid...) > Config vs. read-only is irrelevant. > Operators and manager applications need to know how list entries > are indexed for interoperability. SNMP is mostly for monitoring. > I can't imagine how operators and DM readers would be able to talk about > tables and rows if all the INDEX clauses were removed from read-only tables. In SNMP, the INDEX is needed by the protocol. Not so in NETCONF for non-config data. > Issue 2) > > Why is the CLR about a leaf appearing more than once in the key needed? > It should be up to the DM writer to decide if this makes sense or not: > > list addr-pairs { > key "addr-type src-addr addr-type dest-addr"; What does this mean? What is the difference between this and: key "addr-type src-addr dest-addr"; What does an instance identifier for your example look like? > Issue 3) > Why is the key statement limited to top-level sibling nodes > within the list? Several reasons. Have you seen any CLIs with arbitrarly deep keys? (is it really needed?) What does this mean: list foo { key "a/b/c"; container a { container b { precense "..."; leaf c; } } Or this: list foo { key "a/b/c"; container a { list b { ... leaf c; } } Or this: list foo { key "a/b"; container a { choice x { leaf b; leaf c; } } Also, by allowing deep keys, you force an agent implementation to do buffering of - in the worst case - the entire configuration. You influence the protocol characteristics to the worse. W/o deep keys implementations _can_ do minimal buffering, and thus make the NETCONF protocol usable in smaller devices. I know at least three implementations that work this way today (and I know one that does buffering). > With this constraint on the key-stmt, YANG cannot support > indexing using reusable containers. (There needs to be > exactly one instance of the key component per list entry, > so 'list' and 'choice' nodes cannot be used within a key.) I can also argue that this is an CLR. Why don't you allow: list foo { key address; container address { choice type { leaf ipv4address; leaf ipv6address; leaf name; }; leaf port; } } /martin _______________________________________________ YANG mailing list YANG@ietf.org https://www1.ietf.org/mailman/listinfo/yang
- [YANG] key clause issues Andy Bierman
- Re: [YANG] key clause issues Balazs Lengyel
- Re: [YANG] key clause issues Martin Bjorklund
- Re: [YANG] key clause issues Andy Bierman
- Re: [YANG] key clause issues Andy Bierman
- Re: [YANG] key clause issues Martin Bjorklund
- Re: [YANG] key clause issues Andy Bierman
- Re: [YANG] key clause issues Martin Bjorklund
- Re: [YANG] key clause issues Phil Shafer
- Re: [YANG] key clause issues Andy Bierman