Re: [YANG] mandatory & default
Andy Bierman <ietf@andybierman.com> Fri, 25 January 2008 17:17 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 1JISB2-0006Se-IS; Fri, 25 Jan 2008 12:17:16 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43)
id 1JISB1-0006RV-7a
for yang-confirm+ok@megatron.ietf.org; Fri, 25 Jan 2008 12:17:15 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org)
by megatron.ietf.org with esmtp (Exim 4.43) id 1JISB0-0006RM-Ru
for yang@ietf.org; Fri, 25 Jan 2008 12:17:14 -0500
Received: from smtp118.sbc.mail.sp1.yahoo.com ([69.147.64.91])
by ietf-mx.ietf.org with smtp (Exim 4.43) id 1JISB0-00043V-9t
for yang@ietf.org; Fri, 25 Jan 2008 12:17:14 -0500
Received: (qmail 4847 invoked from network); 25 Jan 2008 17:17:08 -0000
Received: from unknown (HELO ?192.168.0.10?) (andybierman@att.net@67.127.97.95
with plain)
by smtp118.sbc.mail.sp1.yahoo.com with SMTP; 25 Jan 2008 17:17:08 -0000
X-YMail-OSG: mF0EX4wVM1nGqfZxJTUGSaikdt4UImtqrviRe3QX7aVkaCfo
X-Yahoo-Newman-Property: ymail-3
Message-ID: <479A1918.2040203@andybierman.com>
Date: Fri, 25 Jan 2008 09:15:04 -0800
From: Andy Bierman <ietf@andybierman.com>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
To: Balazs Lengyel <balazs.lengyel@ericsson.com>
Subject: Re: [YANG] mandatory & default
References: <4799FD8F.1090402@andybierman.com> <479A002E.3070708@ericsson.com>
In-Reply-To: <479A002E.3070708@ericsson.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Scan-Signature: f4c2cf0bccc868e4cc88dace71fb3f44
Cc: yang <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
Balazs Lengyel wrote: > Hello, > I agree with Andy that a leaf either exists or not. I don't like half > existing defaults. > Please also consider that defaults effect much more then just the > get-config results. (See attachment. > I attached a file about an alternative (and I hope very understandable) > solution. Please start to tell me why it is bad :-) > Balazs > > PS.Sorry if my proposal is long. > Here is just a snippet to discuss: Yang statements: - mandatory: means it must be present in the datastore if the parent exists - initial-value: Will be used at creation of the parent if no value for the leaf is specified. Anything that was created with an initial value will really exist in the configuration. Later it does not matter if it was created explicitly or with an initial value. - default-value: means if the leaf does not exist, the server will use this value internally, but the leaf really does not exist. Can not be used with mandatory. "Must" statements consider the leaf not-existing but we introduce a special hasDefault() function. Or alternatively as a CLR "must" considers the leaf existing.) ------ IMO, this 'default-value' is unacceptable. A manager application may need to retrieve all the nodes that exist in the database. Requiring complex analysis of multiple external documents to determine the value of some of the nodes seems like a huge burden on application developers. How does the manager application know for sure whether an implementation actually supports a node or not? If some nodes are inaccessible under all conditions, but they really exist with some value, then how can a manager application know for sure if the agent really is using the specified default? If the value of the default changes over time, or varies between products or vendors, then how can a manager application know for sure what exact version of the default value is being used by the agent? I know of many operator horror stories in years past, caused by silent, undocumented default value changes between releases, and different code bases across product platforms. A full diff of the config files before and after the upgrade would have instantly revealed the source of the problem, but of course, since nobody needs to see these CLI defaults, that was not an option. Assumption is the mother of all foul-ups, to paraphrase the B movie... Andy _______________________________________________ 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