Re: [YANG] 7.8.3 unique statement

Andy Bierman <ietf@andybierman.com> Fri, 11 January 2008 17:03 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 1JDNHs-0002CK-71; Fri, 11 Jan 2008 12:03:20 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43) id 1JDNHq-00021k-SZ for yang-confirm+ok@megatron.ietf.org; Fri, 11 Jan 2008 12:03:18 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JDNHq-0001zp-Hw for yang@ietf.org; Fri, 11 Jan 2008 12:03:18 -0500
Received: from smtp124.sbc.mail.sp1.yahoo.com ([69.147.64.97]) by ietf-mx.ietf.org with smtp (Exim 4.43) id 1JDNHo-0000rn-E5 for yang@ietf.org; Fri, 11 Jan 2008 12:03:18 -0500
Received: (qmail 23018 invoked from network); 11 Jan 2008 17:03:15 -0000
Received: from unknown (HELO ?192.168.0.10?) (andybierman@att.net@67.126.240.103 with plain) by smtp124.sbc.mail.sp1.yahoo.com with SMTP; 11 Jan 2008 17:03:15 -0000
X-YMail-OSG: kLwUkmYVM1mP.H43nsAvGynBWh5dZpyEvl0p_tJuJVhCyE8s
Message-ID: <4787A152.4030104@andybierman.com>
Date: Fri, 11 Jan 2008 09:03:14 -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> <47879832.8020201@andybierman.com> <20080111.174410.174968555.mbj@tail-f.com>
In-Reply-To: <20080111.174410.174968555.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: b5d20af10c334b36874c0264b10f59f1
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:
> 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.
> 

If the leaf with the default is in a grouping, then
that is because the DM writer wanted it that way,
and if the grouping is used in other places (than this example)
the default is OK.


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

no -- the value specified by the default can be used once.
If the leaf is not provided, and its value has not been used
yet, then it is OK to apply the default and still be unique.


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

If the manager sees FOO-MIB in the schema-discovery or capabilities,
then it will assume this MIB can be used.  No other modules or
capabilities can override the contract that is implied by the
definitions in FOO-MIB.  Period.  So MY-FOO-MIB MUST NOT
add anything that breaks the FOO-MIB contract, if the vendor
wants to claim conformance to FOO-MIB.


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

Standard data models require more than a language.

> 
> 
> /martin
> 
> 


Andy



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