Re: [YANG] 7.6, default value for a type

Martin Bjorklund <mbj@tail-f.com> Mon, 14 January 2008 11:31 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 1JENXm-0006Ar-D7; Mon, 14 Jan 2008 06:31:54 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43) id 1JENXl-0006Al-DL for yang-confirm+ok@megatron.ietf.org; Mon, 14 Jan 2008 06:31:53 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JENXl-0006Ad-1m for yang@ietf.org; Mon, 14 Jan 2008 06:31:53 -0500
Received: from [213.180.94.162] (helo=mail.tail-f.com) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1JENXi-0001IJ-Pu for yang@ietf.org; Mon, 14 Jan 2008 06:31:53 -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 7E66E1B80EF; Mon, 14 Jan 2008 12:31:49 +0100 (CET)
Date: Mon, 14 Jan 2008 12:32:51 +0100 (CET)
Message-Id: <20080114.123251.147112585.mbj@tail-f.com>
To: ietf@andybierman.com
Subject: Re: [YANG] 7.6, default value for a type
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <478A9EB5.9060800@andybierman.com>
References: <47880961.1030506@andybierman.com> <20080113.223852.227441890.mbj@tail-f.com> <478A9EB5.9060800@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: b19722fc8d3865b147c75ae2495625f2
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:
> > Andy Bierman <andy@andybierman.com> wrote:
> >> Hi,
> >>
> >> Sec 7.6, para 5 says:
> >>
> >>     If a leaf has a "default" statement, the leaf's default value is set
> >>     to the value of the "default" statement.  Otherwise, if the leaf's
> >>     type has a default value, and the leaf is not mandatory, then the
> >>     leaf's default value is set to the type's default value.  In all
> >>     other cases, the leaf does not have a default value.
> >>
> >> The default value for each builtin type is not defined anywhere.
> > 
> > This is supposed to be a feature, not a bug.  If every type has a
> > default, you will never be able to define optional leafs.
> > 
> 
> 
> The text is misleading.
> The builtin types do not have default values(good!)
> The order to check the default-stmt is 1) leaf 2) typedef

Ok, so it seems we all agree.  How is the text misleading?  Should it
say: 

     then the
     leaf's default value is set to the type's default value, if one
     exists.


/martin


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