Re: [YANG] default values

Phil Shafer <phil@juniper.net> Fri, 18 January 2008 14:11 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 1JFrwF-0002yI-G9; Fri, 18 Jan 2008 09:11:19 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43) id 1JFrwD-0002qH-FV for yang-confirm+ok@megatron.ietf.org; Fri, 18 Jan 2008 09:11:17 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JFrwD-0002q9-5f for yang@ietf.org; Fri, 18 Jan 2008 09:11:17 -0500
Received: from exprod7og105.obsmtp.com ([64.18.2.163]) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1JFrwC-00009X-O2 for yang@ietf.org; Fri, 18 Jan 2008 09:11:17 -0500
Received: from source ([66.129.224.36]) by exprod7ob105.postini.com ([64.18.6.12]) with SMTP; Fri, 18 Jan 2008 06:11:07 PST
Received: from magenta.juniper.net ([172.17.27.123]) by emailsmtp56.jnpr.net with Microsoft SMTPSVC(6.0.3790.3959); Fri, 18 Jan 2008 06:10:05 -0800
Received: from idle.juniper.net (idleski.juniper.net [172.25.4.26]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id m0IEA4986120; Fri, 18 Jan 2008 06:10:04 -0800 (PST) (envelope-from phil@idle.juniper.net)
Received: from idle.juniper.net (localhost [127.0.0.1]) by idle.juniper.net (8.13.8/8.13.8) with ESMTP id m0IE9tmK010151; Fri, 18 Jan 2008 14:09:55 GMT (envelope-from phil@idle.juniper.net)
Message-Id: <200801181409.m0IE9tmK010151@idle.juniper.net>
To: Balazs Lengyel <balazs.lengyel@ericsson.com>
Subject: Re: [YANG] default values
In-reply-to: <47906FAB.2060505@ericsson.com>
Date: Fri, 18 Jan 2008 09:09:55 -0500
From: Phil Shafer <phil@juniper.net>
X-OriginalArrivalTime: 18 Jan 2008 14:10:05.0437 (UTC) FILETIME=[D3188AD0:01C859DB]
X-Spam-Score: -4.0 (----)
X-Scan-Signature: 97adf591118a232206bdb5a27b217034
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

Balazs Lengyel writes:
>Why would the presence container come back automatically? There's today no text in the d
>raft, 
>that says presence containers are automatically removed or created.

"come back" in the virtual sense, so if the element isn't it the
document, it implicitly is there.  Isn't that what Martin meant by
"present by default"?

>Actually we failed to state what happens, if we later explicitly delete a leaf with a default 
>value. In my view if the user wants to delete it then it should go away; no value presen
>t any more.

If an element is deleted, the configuration should behave as if it never
were present, meaning it should revert to the default.  Otherwise there's
a difference in behavior between not having an statement in the config
and having it but deleting it.  This difference won't be reflected in
the "show" output, and reloading the config or rebooting the device will
give different behavior.

>One more thing I think is still missing from the draft, is whether must expressions cons
>ider 
>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.

Thanks,
 Phil


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