Subject: Re: [netmod] leaf-list uniqueness requirement for non-config nodes

From: Juergen Schoenwaelder <[email-masked]>
Date: Sun, 1 Nov 2015 15:54:51 +0100

On Thu, Oct 29, 2015 at 01:14:39PM +0100, Martin Bjorklund wrote:
> Juergen Schoenwaelder <[email-masked]> wrote:
> > Hi,
> > 
> > RFC 6020 say:
> > 
> >    The values in a leaf-list MUST be unique.
> > 
> > While this may have a justification for config true nodes (to allow
> > modifications of individual elements using edit-config), this
> > constraint does not seem to make much sense for non-config nodes.
> > 
> > Note that YANG requires keys for lists for config nodes (to allow
> > modifications of individual elements using edit-config) but it does
> > not requires keys or uniqueness for for lists for non-config nodes.
> > 
> > In order to be consistent, I think the above requirement should be
> > changed to this:
> > 
> >    The values in a leaf-list MUST be unique if the nodes represent
> >    configuration.
> 
> I think this is kind of ok.  I would prefer to add a new statement
> that declares the leaf-list non-unique.  Such a list would be allowed
> in non-config scenarios.

OK. This would allow LMAP to have a simple vector of values in state
data, notifications, and rpcs. So your proposal would be

   leaf-list foo {
     type string
     unique false;
   }

with unique defaulting to true?

> And depending on the outcome of the discussion you just started on
> Y57, it might be ok also for config data...

Lets keep the threads separate...

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>