Re: [YANG] 7.8.3 unique statement
Andy Bierman <ietf@andybierman.com> Fri, 11 January 2008 16:24 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 1JDMg9-0000it-Na; Fri, 11 Jan 2008 11:24:21 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43)
id 1JDMg9-0000il-7b
for yang-confirm+ok@megatron.ietf.org; Fri, 11 Jan 2008 11:24:21 -0500
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org)
by megatron.ietf.org with esmtp (Exim 4.43) id 1JDMg8-0000ia-Rb
for yang@ietf.org; Fri, 11 Jan 2008 11:24:20 -0500
Received: from smtp110.sbc.mail.mud.yahoo.com ([68.142.198.209])
by chiedprmail1.ietf.org with smtp (Exim 4.43) id 1JDMg8-0002Vx-6u
for yang@ietf.org; Fri, 11 Jan 2008 11:24:20 -0500
Received: (qmail 80687 invoked from network); 11 Jan 2008 16:24:19 -0000
Received: from unknown (HELO ?192.168.0.10?)
(andybierman@att.net@67.126.240.103 with plain)
by smtp110.sbc.mail.mud.yahoo.com with SMTP; 11 Jan 2008 16:24:19 -0000
X-YMail-OSG: wuPMCUQVM1myyqfb5uG0a08K.zCGlyX.H7IHtJKI96IrBEKd
Message-ID: <47879832.8020201@andybierman.com>
Date: Fri, 11 Jan 2008 08:24:18 -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] 7.8.3 unique statement
References: <47860FBA.6090600@andybierman.com>
<20080110.161534.170913919.mbj@tail-f.com>
In-Reply-To: <20080110.161534.170913919.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: 2beba50d0fcdeee5f091c59f204d4365
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: > Hi, > > Andy Bierman <ietf@andybierman.com> wrote: >> Hi, >> >> There seem to be many details left out for the unique-stmt (within a list) >> that need to be in a standard: > > Ok. > >> - what if not all the leafs listed in the unique-stmt are mandatory? >> - is the unique-stmt ignored? >> - Is NULL-value treated as one of the unique values? > > One use case is that you have a single optional leaf in your unique > stmt. That means that if the leaf exists, it's value has to be > unique. > > Another case is that you have multiple optional leafs, and the > combination must be unique. For example, the combination of 'name' > and 'address' in a list of persons is unique. If you have to persons > with the same name, but no address, that would violate the uniqueness. > > So, the set of existing leafs must be unique within all list entries > (if the set is non-empty). > Whether a leaf is mandatory or optional is separate from the unique statement. So the fully specified tuple must be present, and be unique [a b c] If optional 'b' is missing [a c] then the agent ignores that entry when enforcing the uniqueness property. (?!?) > We'll have to try to find the right wording. > >> - what if some missing leafs have defaults (ensuring they will not be unique)? > > I think we should say that the leaf MUST NOT have a default. no, what if the leaf is from a 'uses' expansion? It is also OK to apply the default once. > >> - where are the detailed specifications of the canonical formats >> for each YANG datatype (especially bits, anyxml, string) so that >> every implementation will come up with the same answer when evaluating >> uniqueness? > > Do we need a specification of a canonical format for this? > yes. For UTF-8 and float* there are references, but empty, bits, anyxml, instance-identifier, keyref, and even numbers (17 or +17) need canonical representations in order to compare entries. > Do we need a specification of a canonical format also in order to > handle edit-config delete? > that is a side benefit (this is new NETCONF data modeling turf that has never been properly addressed) > >> - what is the exact behavior required for a NETCONF agent wrt/ <edit-config> >> processing and unique-stmt enforcement? > > It is not checked during edit-config specifically. The text says that > the unique constraints have to be met in a valid configuration. So > you might have temporary violations of these constraints in the > candidate e.g. good point (it is edit-config only if the target is <running/>) > >> - Is there any significance to the order of node identifiers? >> unique "addr port"; >> unique "port addr"; > > No. > >> - Are the target nodes limited to direct definitions and expanded uses? >> (I.e., unique clauses that include leafs expanded from augment not allowed) > > Yes. This follows from the general rule that each definition must be > completely defined within itself. good > > > One more thing that we have talked about adding, is to allow 'unique' > in an augment. For example: > > augment /interface { > unique "ifName"; > leaf ifName { ... } > ... > } > I would rather not add this feature until the requirements for "augments" are better understood. <tangent> One augments concern: what does it mean to declare conformance to a module? If module FOO-MIB includes X and Y, but the vendor also has module MY-FOO-MIB that adds a mandatory Z, does that vendor really conform to FOO-MIB? A manager that only knows about FOO-MIB and not MY-FOO-MIB will not work, so IMO the agent MUST NOT advertise that it supports FOO-MIB. </tangent> > > /martin > > Andy _______________________________________________ YANG mailing list YANG@ietf.org https://www1.ietf.org/mailman/listinfo/yang
- [YANG] 7.8.3 unique statement Andy Bierman
- Re: [YANG] 7.8.3 unique statement Martin Bjorklund
- Re: [YANG] 7.8.3 unique statement Andy Bierman
- Re: [YANG] 7.8.3 unique statement Martin Bjorklund
- Re: [YANG] 7.8.3 unique statement Andy Bierman
- Re: [YANG] 7.8.3 unique statement Martin Bjorklund
- Re: [YANG] 7.8.3 unique statement Balazs Lengyel