[YANG] 7.6, default value for a type
Andy Bierman <andy@andybierman.com> Sun, 13 January 2008 13:30 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 1JE2uy-0001Pj-Lp; Sun, 13 Jan 2008 08:30:28 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43)
id 1JDUDU-0001QA-1t
for yang-confirm+ok@megatron.ietf.org; Fri, 11 Jan 2008 19:27:16 -0500
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org)
by megatron.ietf.org with esmtp (Exim 4.43) id 1JDUDT-0001Q2-Mj
for yang@ietf.org; Fri, 11 Jan 2008 19:27:15 -0500
Received: from smtp123.sbc.mail.sp1.yahoo.com ([69.147.64.96])
by chiedprmail1.ietf.org with smtp (Exim 4.43) id 1JDUDT-0007A8-7Z
for yang@ietf.org; Fri, 11 Jan 2008 19:27:15 -0500
Received: (qmail 98928 invoked from network); 12 Jan 2008 00:27:14 -0000
Received: from unknown (HELO ?192.168.0.10?)
(andybierman@att.net@67.126.240.103 with plain)
by smtp123.sbc.mail.sp1.yahoo.com with SMTP; 12 Jan 2008 00:27:13 -0000
X-YMail-OSG: BvwfBzcVM1nR5SwjHQTprCbrlgszxaa5sHN.41m_PLTTPsEb
Message-ID: <47880961.1030506@andybierman.com>
Date: Fri, 11 Jan 2008 16:27:13 -0800
From: Andy Bierman <andy@andybierman.com>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
To: yang <yang@ietf.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 9466e0365fc95844abaf7c3f15a05c7d
X-Mailman-Approved-At: Sun, 13 Jan 2008 08:30:26 -0500
Subject: [YANG] 7.6, default value for a type
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
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 a nice detail, and covers things like the agent creating
a bunch of counter objects or ifOperStatus objects.
It mandates that a specific value will be used, not random values.
What are the specific values?
- int8 to uint64: 0
- float32, float64: 0.0
- string, binary, instance-identifier: empty string
- enumeration: ??? (!) [first value?]
- boolean: false
- bits: empty bitset
- keyref: default for data type of 'path'
Andy
_______________________________________________
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