Re: [YANG] 7.8.3 unique statement

Martin Bjorklund <mbj@tail-f.com> Fri, 11 January 2008 16:43 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 1JDMyU-0002Um-74; Fri, 11 Jan 2008 11:43:18 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43) id 1JDMyS-0002MT-QA for yang-confirm+ok@megatron.ietf.org; Fri, 11 Jan 2008 11:43:16 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JDMyS-0002ML-GZ for yang@ietf.org; Fri, 11 Jan 2008 11:43:16 -0500
Received: from [213.180.94.162] (helo=mail.tail-f.com) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1JDMyR-00082o-Vz for yang@ietf.org; Fri, 11 Jan 2008 11:43:16 -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 0ED5F1B80D8; Fri, 11 Jan 2008 17:43:14 +0100 (CET)
Date: Fri, 11 Jan 2008 17:44:10 +0100 (CET)
Message-Id: <20080111.174410.174968555.mbj@tail-f.com>
To: ietf@andybierman.com
Subject: Re: [YANG] 7.8.3 unique statement
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <47879832.8020201@andybierman.com>
References: <47860FBA.6090600@andybierman.com> <20080110.161534.170913919.mbj@tail-f.com> <47879832.8020201@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.0 (/)
X-Scan-Signature: 52f7a77164458f8c7b36b66787c853da
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

Andy Bierman <ietf@andybierman.com> wrote:
> Martin Bjorklund wrote:
> > 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. (?!?)

Yes.

> > 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?

I don't understand.

> It is also OK to apply the default once.

So you would allow one instance with the default, and the rest has to
have values set?

> > 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.

Ok.

> <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>

But that won't work.  If I impplement FOO-MIB, how do I know that
there is some other module somewhere that augments it?  I think we
have to restrict the augment to not augment with any mandatory nodes.

This is be similar to the rules for versioning - you are not allowed
to add mandatory nodes in a new revision of the module.  And the
reason in both these cases is the same - to make sure that clients
that uses the old revision (or not using the module with the augment)
still work.


/martin


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