Re: [YANG] default values

Balazs Lengyel <balazs.lengyel@ericsson.com> Fri, 18 January 2008 15:56 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 1JFta7-0002oa-Gm; Fri, 18 Jan 2008 10:56:35 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43) id 1JFta5-0002oN-SD for yang-confirm+ok@megatron.ietf.org; Fri, 18 Jan 2008 10:56:33 -0500
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JFta5-0002oF-H9 for yang@ietf.org; Fri, 18 Jan 2008 10:56:33 -0500
Received: from mailgw3.ericsson.se ([193.180.251.60]) by chiedprmail1.ietf.org with esmtp (Exim 4.43) id 1JFta4-00072i-TN for yang@ietf.org; Fri, 18 Jan 2008 10:56:33 -0500
Received: from mailgw3.ericsson.se (unknown [127.0.0.1]) by mailgw3.ericsson.se (Symantec Mail Security) with ESMTP id 4AD5A21079; Fri, 18 Jan 2008 16:56:32 +0100 (CET)
X-AuditID: c1b4fb3c-ad31ebb0000007e0-df-4790cc30e342
Received: from esealmw126.eemea.ericsson.se (unknown [153.88.254.123]) by mailgw3.ericsson.se (Symantec Mail Security) with ESMTP id 380912103B; Fri, 18 Jan 2008 16:56:32 +0100 (CET)
Received: from esealmw128.eemea.ericsson.se ([153.88.254.172]) by esealmw126.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830); Fri, 18 Jan 2008 16:56:31 +0100
Received: from [159.107.197.224] ([159.107.197.224]) by esealmw128.eemea.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830); Fri, 18 Jan 2008 16:56:31 +0100
Message-ID: <4790F2DA.1030705@ericsson.com>
Date: Fri, 18 Jan 2008 19:41:30 +0100
From: Balazs Lengyel <balazs.lengyel@ericsson.com>
User-Agent: Thunderbird 2.0.0.4 (X11/20070604)
MIME-Version: 1.0
To: Martin Bjorklund <mbj@tail-f.com>
Subject: Re: [YANG] default values
References: <47906FAB.2060505@ericsson.com> <200801181409.m0IE9tmK010151@idle.juniper.net> <20080118.154949.83008967.mbj@tail-f.com>
In-Reply-To: <20080118.154949.83008967.mbj@tail-f.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 18 Jan 2008 15:56:31.0474 (UTC) FILETIME=[B1787520:01C859EA]
X-Brightmail-Tracker: AAAAAA==
X-Spam-Score: -1.0 (-)
X-Scan-Signature: 769a46790fb42fbb0b0cc700c82f7081
Cc: yang@ietf.org, lhotka@cesnet.cz
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

If we could agree that a leaf thats set automatically to it's default at least conceptually 
exists, that would make understanding how this works MUCH easier.
However we have to describe how this effects non-presence containers
Balazs

Martin Bjorklund wrote:
> Phil Shafer <phil@juniper.net> wrote:
>> Balazs Lengyel writes:
> 
>>> One more thing I think is still missing from the draft, is whether
>>> must expressions consider default values or not?
>> We discussed this at some point and decided that "must"s must
>> see defaults, but there needs to be a helper function to allow
>> one to detect unconfigured values.
>>
>>     must "../mtu < 1500 or not(yang:is-set(../mtu))";
>>
>> I don't think this is in the current spec.
> 
> It's on my TODO list.
> 
> I was thinking the text should say that default values exist in the
> data tree, and then clarify the text about XML encoding of leafs to
> say that leafs which are set to their default values in the data tree
> do not have to be sent.  The must description talks about the data
> tree, so by adding the defaults to the data tree, the must expressions
> are covered.
> 
> One question is how the xpath function should behave:
> 
>                             node set     node set to   node does
>                             to default   other value   not exist
>    --------------------------------------------------------------
>    yang:has-default(node)    true          false         false
>    yang:is-set(node)         false         true          false
> 
> 
> Maybe it's no big deal - if you want to check for existance, that's
> trivial in XPath.
> 
> 
> /martin

-- 
Balazs Lengyel                       Ericsson Hungary Ltd.
TSP System Manager
ECN: 831 7320                        Fax: +36 1 4377792
Tel: +36-1-437-7320     email: Balazs.Lengyel@ericsson.com


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