Re: [YANG] new pyang errors

Martin Bjorklund <mbj@tail-f.com> Fri, 18 January 2008 21:36 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 1JFyt9-0006tf-G3; Fri, 18 Jan 2008 16:36:35 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43) id 1JFyt8-0006qu-9V for yang-confirm+ok@megatron.ietf.org; Fri, 18 Jan 2008 16:36:34 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JFyt7-0006nw-V4 for yang@ietf.org; Fri, 18 Jan 2008 16:36:33 -0500
Received: from [213.180.94.162] (helo=mail.tail-f.com) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1JFyt5-0006zj-ND for yang@ietf.org; Fri, 18 Jan 2008 16:36:33 -0500
Received: from localhost (c213-100-166-13.swipnet.se [213.100.166.13]) by mail.tail-f.com (Postfix) with ESMTP id 3B6FC1B80C9; Fri, 18 Jan 2008 22:36:28 +0100 (CET)
Date: Fri, 18 Jan 2008 22:35:11 +0100 (CET)
Message-Id: <20080118.223511.146519405.mbj@tail-f.com>
To: phil@juniper.net
Subject: Re: [YANG] new pyang errors
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <200801182108.m0IL8M38012597@idle.juniper.net>
References: <4790DD1E.7090807@andybierman.com> <200801182108.m0IL8M38012597@idle.juniper.net>
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: d6b246023072368de71562c0ab503126
Cc: yang@ietf.org, andy@andybierman.com
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 <phil@juniper.net> 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.

This is one of the areas where we've had some discussions.  If you
classify leafs as 'mandatory' and 'optional', where does a leaf w/ a
default fit in?  IMO it doesn't really matter, it just have to be
clear.  In YANG we chose to define 'mandatory' as mandatory to set,
and a leaf with a default is optional to set.  Thus you cannot have
mandatory and default on one leaf.


/martin


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