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

Martin Bjorklund <mbj@tail-f.com> Mon, 14 January 2008 11:45 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 1JENki-0001me-V3; Mon, 14 Jan 2008 06:45:16 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43) id 1JENkh-0001Zc-Kd for yang-confirm+ok@megatron.ietf.org; Mon, 14 Jan 2008 06:45:15 -0500
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JENkh-0001Tc-5t for yang@ietf.org; Mon, 14 Jan 2008 06:45:15 -0500
Received: from [213.180.94.162] (helo=mail.tail-f.com) by chiedprmail1.ietf.org with esmtp (Exim 4.43) id 1JENkg-0006zQ-P2 for yang@ietf.org; Mon, 14 Jan 2008 06:45:15 -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 9F6D71B80EF; Mon, 14 Jan 2008 12:45:13 +0100 (CET)
Date: Mon, 14 Jan 2008 12:46:16 +0100 (CET)
Message-Id: <20080114.124616.64479129.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: <20080114.123251.147112585.mbj@tail-f.com>
References: <20080113.223852.227441890.mbj@tail-f.com> <478A9EB5.9060800@andybierman.com> <20080114.123251.147112585.mbj@tail-f.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.1 (/)
X-Scan-Signature: 39bd8f8cbb76cae18b7e23f7cf6b2b9f
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 <mbj@tail-f.com> wrote:
> 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.

I realized that this case was already covered by the current text.
Sorry for the noise.


/martin


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