Re: [YANG] insert and key attributes

Phil Shafer <phil@juniper.net> Fri, 11 January 2008 20:40 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 1JDQg2-0008B8-1q; Fri, 11 Jan 2008 15:40:30 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43) id 1JDQg1-0008B3-1V for yang-confirm+ok@megatron.ietf.org; Fri, 11 Jan 2008 15:40:29 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JDQg0-0008Av-7V for yang@ietf.org; Fri, 11 Jan 2008 15:40:28 -0500
Received: from exprod7og102.obsmtp.com ([64.18.2.157]) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1JDQfz-0004o8-R0 for yang@ietf.org; Fri, 11 Jan 2008 15:40:28 -0500
Received: from source ([66.129.224.36]) by exprod7ob102.postini.com ([64.18.6.12]) with SMTP; Fri, 11 Jan 2008 12:40:15 PST
Received: from magenta.juniper.net ([172.17.27.123]) by emailsmtp55.jnpr.net with Microsoft SMTPSVC(6.0.3790.1830); Fri, 11 Jan 2008 12:39:26 -0800
Received: from idle.juniper.net (idleski.juniper.net [172.25.4.26]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id m0BKdQ946977; Fri, 11 Jan 2008 12:39:26 -0800 (PST) (envelope-from phil@idle.juniper.net)
Received: from idle.juniper.net (localhost [127.0.0.1]) by idle.juniper.net (8.13.8/8.13.8) with ESMTP id m0BKdNDl037488; Fri, 11 Jan 2008 20:39:23 GMT (envelope-from phil@idle.juniper.net)
Message-Id: <200801112039.m0BKdNDl037488@idle.juniper.net>
To: Andy Bierman <ietf@andybierman.com>
Subject: Re: [YANG] insert and key attributes
In-reply-to: <478790F4.1050807@andybierman.com>
Date: Fri, 11 Jan 2008 15:39:22 -0500
From: Phil Shafer <phil@juniper.net>
X-OriginalArrivalTime: 11 Jan 2008 20:39:26.0284 (UTC) FILETIME=[0E5AA8C0:01C85492]
X-Spam-Score: -4.0 (----)
X-Scan-Signature: 39bd8f8cbb76cae18b7e23f7cf6b2b9f
Cc: yang <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

Andy Bierman writes:
>1) sec. 7.8.6 mentions the 'key' attribute (great, another
>    overloaded term ;-) but this is not formally defined anywhere.
>    The terse definition of the 'insert' attribute is not a formal
>    definition either.

Yup, this needs some additional words.

>    In general, all the new requirements
>    that YANG places on NETCONF agents is scattered throughout
>    the document, and not entirely obvious.

What are you envisioning?  A section for NETCONF agent authors that
don't want to read the entire document?

>2) para 4 in 7.8.6 says if insert is missing, then it defaults
>    to last.  Even in a list indexed by an integer.  This seems
>    strange to me, to use an integral key and then ignore the actual
>    base type, but I guess 'ordered-by-user' implies that the base type
>    of the key has no meaning to the agent.

Exactly.  The key gives uniqueness but not order.

>3) The last example in 7.8.7 is confusing.
>    (There is a typo "to move a the new user 'barney'".)
>    If 'barney' was already inserted after 'fred' (previous page)
>    then the merge of 'barney' before 'fred' will fail in NETCONF.
>    There is no move operation in NETCONF.  You cannot edit the
>    value of a key.  The example would actually have no affect
>    in NETCONF, since the <name> field was already set to 'barney'.

YANG uses "merge" w/ insert to move existing data, since not having
a move operation is a bug.  Do we need to define our own
"yang:operation='move'" to achieve this?

Thanks,
 Phil


_______________________________________________
YANG mailing list
YANG@ietf.org
https://www1.ietf.org/mailman/listinfo/yang