Re: [YANG] 7.6, default value for a type
Martin Bjorklund <mbj@tail-f.com> Sun, 13 January 2008 21:39 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 1JEAYf-0001xn-D5; Sun, 13 Jan 2008 16:39:57 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43)
id 1JEAYd-0001tn-Iz
for yang-confirm+ok@megatron.ietf.org; Sun, 13 Jan 2008 16:39:56 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org)
by megatron.ietf.org with esmtp (Exim 4.43) id 1JEAYd-0001te-9F
for yang@ietf.org; Sun, 13 Jan 2008 16:39:55 -0500
Received: from [213.180.94.162] (helo=mail.tail-f.com)
by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1JEAYc-0005kd-UP
for yang@ietf.org; Sun, 13 Jan 2008 16:39:55 -0500
Received: from localhost (c213-100-166-13.swipnet.se [213.100.166.13])
by mail.tail-f.com (Postfix) with ESMTP id A7E061B80C4;
Sun, 13 Jan 2008 22:39:52 +0100 (CET)
Date: Sun, 13 Jan 2008 22:38:52 +0100 (CET)
Message-Id: <20080113.223852.227441890.mbj@tail-f.com>
To: andy@andybierman.com
Subject: Re: [YANG] 7.6, default value for a type
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <47880961.1030506@andybierman.com>
References: <47880961.1030506@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: 93238566e09e6e262849b4f805833007
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 <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. > This is a nice detail, and covers things like the agent creating > a bunch of counter objects or ifOperStatus objects. Yes. Define ifOperStatus with a default, or use a type with a default. /martin _______________________________________________ YANG mailing list YANG@ietf.org https://www1.ietf.org/mailman/listinfo/yang
- [YANG] 7.6, default value for a type Andy Bierman
- Re: [YANG] 7.6, default value for a type Juergen Schoenwaelder
- Re: [YANG] 7.6, default value for a type Martin Bjorklund
- Re: [YANG] 7.6, default value for a type Andy Bierman
- Re: [YANG] 7.6, default value for a type Martin Bjorklund
- Re: [YANG] 7.6, default value for a type Martin Bjorklund