Re: [YANG] meaning of unique in PDUs
Martin Bjorklund <mbj@tail-f.com> Fri, 25 January 2008 12:42 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 1JINtW-0000XM-5F; Fri, 25 Jan 2008 07:42:54 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43)
id 1JINtU-0000XG-If
for yang-confirm+ok@megatron.ietf.org; Fri, 25 Jan 2008 07:42:52 -0500
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org)
by megatron.ietf.org with esmtp (Exim 4.43) id 1JINtU-0000X8-7m
for yang@ietf.org; Fri, 25 Jan 2008 07:42:52 -0500
Received: from [213.180.94.162] (helo=mail.tail-f.com)
by chiedprmail1.ietf.org with esmtp (Exim 4.43) id 1JINtT-0005CT-LQ
for yang@ietf.org; Fri, 25 Jan 2008 07:42:52 -0500
Received: from localhost (138.162.241.83.in-addr.dgcsystems.net
[83.241.162.138])
by mail.tail-f.com (Postfix) with ESMTP id 55F821B80CC;
Fri, 25 Jan 2008 13:42:50 +0100 (CET)
Date: Fri, 25 Jan 2008 13:44:17 +0100 (CET)
Message-Id: <20080125.134417.43491219.mbj@tail-f.com>
To: lhotka@cesnet.cz
Subject: Re: [YANG] meaning of unique in PDUs
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <1201262219.24635.125.camel@missotis>
References: <200801250311.m0P3Bhbo036061@idle.juniper.net>
<1201262219.24635.125.camel@missotis>
X-Mailer: Mew version 5.1.51 on Emacs 22.1 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
X-Spam-Score: 0.1 (/)
X-Scan-Signature: 39bd8f8cbb76cae18b7e23f7cf6b2b9f
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>
Content-Type: multipart/mixed; boundary="===============2090693356=="
Errors-To: yang-bounces@ietf.org
Ladislav Lhotka <lhotka@cesnet.cz> wrote: > Phil Shafer píše v Čt 24. 01. 2008 v 22:11 -0500: > > >In some cases this mapping is automatic, some cases are defined in the > > >YANG draft and some are not clear yet (to me at least). > > > > Please let me know where it isn't clear and we can fix the draft. > > > Here is one: what's the interpretation (if any) of the unique statement > for PDUs? The draft says: The "unique" statement is used to put constraints on valid configurations. [...] In a valid configuration, the combined values of all the leaf instances specified in the string MUST be unique within all list entry instances. Maybe we should be more clear what we mean with "valid configuration"? > Example: > > list aaa { > key "k"; > unique "b c"; > leaf k { ... } > leaf b { ... } > leaf c { ... } > > and assume the existing configuration contains two list items: > > <aaa> > <k>k1</k> <b>b1</b> <c>c1</c> > </aaa> > <aaa> > <k>k2</k> <b>b2</b> <c>c2</c> > </aaa> > > 1. Is it possible to send the following fragment in an edit-config > (merge mode)? > > <aaa> > <k>k1</k> <b>b3</b> > <aaa> > <aaa> > <k>k2</k> <b>b3</b> > <aaa> > > That is, after merging the resulting configuration will still satisfy > the statement 'unique "b c"' (values of c are different) but the PDU > doeasn't. Absolutely. Also note that if you're modifying the candidate, it is also ok to send: <aaa> <k>k1</k> <b>b3</b> <c>c3</c> <aaa> <aaa> <k>k2</k> <b>b3</b> <c>c3</c> <aaa> When you <validate/> the candidate, it will fail. It will also fail to <commit/>. > 2. Does "unique" and also "key" statements assume any space > normalisation? For example, are the following keys different? > > <k>k1</k> > > <k> > k1 > </k> This isn't really a "unique" or "key" question; it is a datatype equestion. In this case, the YANG built-in type "string" behaves as "xs:string", so no whitespace normalization is done. /martin
_______________________________________________ YANG mailing list YANG@ietf.org https://www1.ietf.org/mailman/listinfo/yang
- [YANG] new pyang errors Andy Bierman
- [YANG] new pyang errors Andy Bierman
- Re: [YANG] new pyang errors Phil Shafer
- Re: [YANG] new pyang errors Martin Bjorklund
- Re: [YANG] new pyang errors Andy Bierman
- Re: [YANG] new pyang errors Phil Shafer
- Re: [YANG] new pyang errors Andy Bierman
- Re: [YANG] new pyang errors Andy Bierman
- Re: [YANG] new pyang errors Martin Bjorklund
- Re: [YANG] new pyang errors Phil Shafer
- Re: [YANG] new pyang errors Andy Bierman
- Re: [YANG] new pyang errors Ladislav Lhotka
- Re: [YANG] new pyang errors Phil Shafer
- Re: [YANG] new pyang errors Phil Shafer
- Re: [YANG] new pyang errors Randy Presuhn
- Re: [YANG] new pyang errors Phil Shafer
- Re: [YANG] new pyang errors Andy Bierman
- Re: [YANG] new pyang errors Randy Presuhn
- Re: [YANG] new pyang errors Ladislav Lhotka
- Re: [YANG] new pyang errors Juergen Schoenwaelder
- Re: [YANG] new pyang errors Juergen Schoenwaelder
- Re: [YANG] new pyang errors Ladislav Lhotka
- Re: [YANG] new pyang errors Juergen Schoenwaelder
- Re: [YANG] new pyang errors Ladislav Lhotka
- Re: [YANG] new pyang errors Ladislav Lhotka
- Re: [YANG] new pyang errors Balazs Lengyel
- Re: [YANG] new pyang errors Juergen Schoenwaelder
- Re: [YANG] new pyang errors Balazs Lengyel
- Re: [YANG] new pyang errors Balazs Lengyel
- Re: [YANG] new pyang errors Ladislav Lhotka
- Re: [YANG] new pyang errors Juergen Schoenwaelder
- Re: [YANG] new pyang errors Ladislav Lhotka
- Re: [YANG] new pyang errors Ladislav Lhotka
- Re: [YANG] new pyang errors Juergen Schoenwaelder
- Re: [YANG] new pyang errors Ladislav Lhotka
- Re: [YANG] new pyang errors Juergen Schoenwaelder
- Re: [YANG] new pyang errors Ladislav Lhotka
- Re: [YANG] new pyang errors Andy Bierman
- Re: [YANG] new pyang errors Phil Shafer
- Re: [YANG] new pyang errors Juergen Schoenwaelder
- Re: [YANG] new pyang errors Phil Shafer
- Re: [YANG] new pyang errors Phil Shafer
- Re: [YANG] new pyang errors Martin Bjorklund
- Re: [YANG] new pyang errors Phil Shafer
- Re: [YANG] new pyang errors Ladislav Lhotka
- Re: [YANG] new pyang errors Balazs Lengyel
- Re: [YANG] new pyang errors Balazs Lengyel
- Re: [YANG] new pyang errors Phil Shafer
- Re: [YANG] new pyang errors Phil Shafer
- Re: [YANG] new pyang errors Andy Bierman
- Re: [YANG] new pyang errors Phil Shafer
- Re: [YANG] new pyang errors Ladislav Lhotka
- Re: [YANG] new pyang errors Phil Shafer
- Re: [YANG] new pyang errors Randy Presuhn
- Re: [YANG] new pyang errors Phil Shafer
- Re: [YANG] new pyang errors Ladislav Lhotka
- Re: [YANG] new pyang errors Juergen Schoenwaelder
- Re: [YANG] new pyang errors Ladislav Lhotka
- Re: [YANG] new pyang errors Ladislav Lhotka
- Re: [YANG] new pyang errors Juergen Schoenwaelder
- Re: [YANG] new pyang errors Balazs Lengyel
- Re: [YANG] new pyang errors Ladislav Lhotka
- Re: [YANG] new pyang errors Ladislav Lhotka
- [YANG] meaning of unique in PDUs Ladislav Lhotka
- RE: [YANG] new pyang errors Bert Wijnen
- Re: [YANG] meaning of unique in PDUs Martin Bjorklund
- Re: [YANG] new pyang errors Juergen Schoenwaelder
- Re: [YANG] new pyang errors Juergen Schoenwaelder
- Re: [YANG] meaning of unique in PDUs Ladislav Lhotka
- RE: [YANG] new pyang errors Bert Wijnen