Re: [YANG] new pyang errors

Andy Bierman <ietf@andybierman.com> Sat, 19 January 2008 01:04 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 1JG28N-00082y-Ix; Fri, 18 Jan 2008 20:04:31 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43) id 1JG28N-00080C-1U for yang-confirm+ok@megatron.ietf.org; Fri, 18 Jan 2008 20:04:31 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JG28M-0007w4-Fl for yang@ietf.org; Fri, 18 Jan 2008 20:04:30 -0500
Received: from smtp123.sbc.mail.sp1.yahoo.com ([69.147.64.96]) by ietf-mx.ietf.org with smtp (Exim 4.43) id 1JG28M-0003TN-1e for yang@ietf.org; Fri, 18 Jan 2008 20:04:30 -0500
Received: (qmail 96506 invoked from network); 19 Jan 2008 01:04:29 -0000
Received: from unknown (HELO andrew-biermans-computer.local) (andybierman@att.net@67.126.240.103 with plain) by smtp123.sbc.mail.sp1.yahoo.com with SMTP; 19 Jan 2008 01:04:29 -0000
X-YMail-OSG: rCHhicMVM1lXKGNQ5NsiPJ6el2Rlu7rQcRaNIvRE.ULbhjR0
X-Yahoo-Newman-Property: ymail-3
Message-ID: <47914C9D.2090909@andybierman.com>
Date: Fri, 18 Jan 2008 17:04:29 -0800
From: Andy Bierman <ietf@andybierman.com>
User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031)
MIME-Version: 1.0
To: Phil Shafer <phil@juniper.net>
Subject: Re: [YANG] new pyang errors
References: <200801182108.m0IL8M38012597@idle.juniper.net>
In-Reply-To: <200801182108.m0IL8M38012597@idle.juniper.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 82c9bddb247d9ba4471160a9a865a5f3
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

Phil Shafer wrote:
> Andy Bierman writes:
>> Mandatory means it must be present in a
>> valid config, not that the manager must set some value.
> 
> That's certainly not the way I read mandatory.  Mandatory
> means that it must be set, meaning that some{one,thing}
> must set it.  If there were a reasonable default, you
> shouldn't need to make it mandatory.
> 


I can only find 2 brief paragraphs of text on the mandatory-stmt:

7.6.4.  The leaf's mandatory Statement

    The "mandatory" statement, which is optional, takes as an argument
    the string "true" or "false".  If "mandatory" is "true", the node
    must exist in a valid configuration if its parent node exists.

    If not specified, the default is "false".


7.9.4.  The choice's mandatory Statement

    The "mandatory" statement, which is optional, takes as an argument
    the string "true" or "false".  If "mandatory" is "true", nodes from
    exactly one of the choice's case branches MUST exist in a valid
    configuration.

    If not specified, the default is "false".


The current draft clearly says that 'mandatory true' refers to the
configuration database, not to whether the manager must provide
an explicit value.

I agree with the interpretation in the current draft.

YANG needs to be more consistent wrt/ mixing DM concepts too much.
The data model object definitions (leaf, container, etc.) refer
to the desired/expected state of the configuration database,
not with individual PDUs.

The reason that the data model MUST refer to the configuration
is that schema validation of NETCONF PDUs is mostly meaningless.
Since the PDUs are so flexible, every single element and attribute
would need to be marked optional (minOccurs=0).



> Thanks,
>  Phil
> 

Andy


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