Re: [YANG] mandatory & default
Andy Bierman <ietf@andybierman.com> Sat, 26 January 2008 00:09 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 1JIYbU-0000KU-NM; Fri, 25 Jan 2008 19:09:00 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43)
id 1JIYbT-0000KP-EC
for yang-confirm+ok@megatron.ietf.org; Fri, 25 Jan 2008 19:08:59 -0500
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org)
by megatron.ietf.org with esmtp (Exim 4.43) id 1JIYbS-0000KH-N2
for yang@ietf.org; Fri, 25 Jan 2008 19:08:59 -0500
Received: from smtp119.sbc.mail.sp1.yahoo.com ([69.147.64.92])
by chiedprmail1.ietf.org with smtp (Exim 4.43) id 1JIYbS-0004hY-38
for yang@ietf.org; Fri, 25 Jan 2008 19:08:58 -0500
Received: (qmail 81998 invoked from network); 26 Jan 2008 00:08:57 -0000
Received: from unknown (HELO ?192.168.0.10?)
(andybierman@att.net@67.126.129.159 with plain)
by smtp119.sbc.mail.sp1.yahoo.com with SMTP; 26 Jan 2008 00:08:56 -0000
X-YMail-OSG: q4LzjTsVM1lL0E_cyGkxcP02loxMAwA4yIMSb52YeZn8B5Ip
X-Yahoo-Newman-Property: ymail-3
Message-ID: <479A799D.1060003@andybierman.com>
Date: Fri, 25 Jan 2008 16:06:53 -0800
From: Andy Bierman <ietf@andybierman.com>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
To: Martin Bjorklund <mbj@tail-f.com>
Subject: Re: [YANG] mandatory & default
References: <4799FD8F.1090402@andybierman.com> <20080125.233824.88508964.mbj@tail-f.com> <479A6CDF.5030304@andybierman.com>
<20080126.002618.144263975.mbj@tail-f.com>
In-Reply-To: <20080126.002618.144263975.mbj@tail-f.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 1676547e4f33b5e63227e9c02bd359e3
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 wrote: > Andy Bierman <ietf@andybierman.com> wrote: >>> Or, if you, for a moment, try to view thing from the other side, you >>> need an extension with-defaults=true to actually get the default >>> values, since they are not stored in the configuration data store. >>> >> I disagree. >> >> If I invoke an <edit-config> and set the leaf to this >> default value, it is still not there? > > Yes it's there. > >> If I invoke an <edit-config> and set the leaf to a >> non-default value, it is clearly there. > > Yes it's there. > Therefore this approach is broken. container interfaces { list interface { key name; leaf name { type InterfaceName; } leaf mtu { type uint32; default 1500; } } } I start out with a get-config, and mtu is not there: <interfaces> <interface> <name>eth0</name> <mtu>1600</mtu> </interface> <interface> <name>eth1</name> </interface> </interfaces> Does /interfaces/interface[name=eth1]/mtu exist or not? If not, then I can do an edit-config to create it: <config> <interfaces> <interface> <name>eth1</eth1> <mtu nc:operation='create'>1500</mtu> </interface> </interfaces> </config> Does this succeed? NETCONF says it should, because the leaf did not get returned in the previous <get-config>. Now I do a get-config again and get back: <interfaces> <interface> <name>eth0</name> <mtu>1600</mtu> </interface> <interface> <name>eth1</name> <mtu>1500</mtu> </interface> </interfaces> The leaf never really changed value, but you would never know that from the NETCONF PDU responses. After a system reboot, does the agent 'remember' that mtu was set to 1500 by the manager, so the initial <running/> config from NV-storage after the next reboot has an mtu leaf for eth1? Andy >> Whether the manager or the agent sets the leaf to the default, >> it is there from a NETCONF protocol PoV. > > The crucial point is that - in this way of seeing things - the agent > does not set the leaf to the default. Again, I do understand that > there are other ways to define how defaults work. I'm just trying to > explain the rationale for this one. > > >>>> Phil seems to be arguing that nodes that contain the agent-specified >>>> default value are not really there. >>> Right, since they are not there in his implementation. Why would you >>> store stuff that's not even needed to store? That's just a waste of >>> resources. >> >> Nobody said anything about storing the value. > > I just tried to explain why "nodes that contain the agent-specified > default value are not really there". > >> It is an implementation-specific matter as to how >> an agent generates a reply to a <get-config> request. >> The defaults do not have to be stored -- they can >> be generated on the fly. > > Agreed. > > > /martin > > _______________________________________________ YANG mailing list YANG@ietf.org https://www1.ietf.org/mailman/listinfo/yang
- [YANG] mandatory & default Andy Bierman
- Re: [YANG] mandatory & default Balazs Lengyel
- Re: [YANG] mandatory & default Andy Bierman
- Re: [YANG] mandatory & default Ladislav Lhotka
- Re: [YANG] mandatory & default Martin Bjorklund
- Re: [YANG] mandatory & default Andy Bierman
- Re: [YANG] mandatory & default Martin Bjorklund
- Re: [YANG] mandatory & default Andy Bierman
- Re: [YANG] mandatory & default Martin Bjorklund
- Re: [YANG] mandatory & default Andy Bierman
- Re: [YANG] mandatory & default Phil Shafer
- Re: [YANG] mandatory & default Andy Bierman
- Re: [YANG] mandatory & default Randy Presuhn
- Re: [YANG] mandatory & default Phil Shafer
- Re: [YANG] mandatory & default Phil Shafer
- Re: [YANG] mandatory & default Ladislav Lhotka
- Re: [YANG] mandatory & default Balazs Lengyel
- Re: [YANG] mandatory & default Juergen Schoenwaelder
- Re: [YANG] mandatory & default Ladislav Lhotka
- Re: [YANG] mandatory & default Juergen Schoenwaelder
- Re: [YANG] mandatory & default Ladislav Lhotka
- Re: [YANG] mandatory & default Juergen Schoenwaelder
- Re: [YANG] mandatory & default Balazs Lengyel
- Re: [YANG] mandatory & default Andy Bierman
- Re: [YANG] mandatory & default Ladislav Lhotka
- Re: [YANG] mandatory & default tom.petch
- Re: [YANG] mandatory & default Andy Bierman