Re: [YANG] new pyang errors

Andy Bierman <ietf@andybierman.com> Sat, 19 January 2008 18:39 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 1JGIbm-0002If-F7; Sat, 19 Jan 2008 13:39:58 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43) id 1JGIbk-0002IK-Tk for yang-confirm+ok@megatron.ietf.org; Sat, 19 Jan 2008 13:39:56 -0500
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JGIbk-0002IA-Ih for yang@ietf.org; Sat, 19 Jan 2008 13:39:56 -0500
Received: from smtp124.sbc.mail.sp1.yahoo.com ([69.147.64.97]) by chiedprmail1.ietf.org with smtp (Exim 4.43) id 1JGIbk-0001mH-36 for yang@ietf.org; Sat, 19 Jan 2008 13:39:56 -0500
Received: (qmail 57808 invoked from network); 19 Jan 2008 18:39:55 -0000
Received: from unknown (HELO ?192.168.0.10?) (andybierman@att.net@67.126.240.103 with plain) by smtp124.sbc.mail.sp1.yahoo.com with SMTP; 19 Jan 2008 18:39:54 -0000
X-YMail-OSG: lYBUtvQVM1kdG0EOhvNhehmTI_PIKr0m73KwX12z0COvq0sY
X-Yahoo-Newman-Property: ymail-3
Message-ID: <479243FA.1010008@andybierman.com>
Date: Sat, 19 Jan 2008 10:39:54 -0800
From: Andy Bierman <ietf@andybierman.com>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
To: Phil Shafer <phil@juniper.net>
Subject: Re: [YANG] new pyang errors
References: <200801191738.m0JHcUYi016993@idle.juniper.net>
In-Reply-To: <200801191738.m0JHcUYi016993@idle.juniper.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 50a516d93fd399dc60588708fd9a3002
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

Phil Shafer wrote:
> Andy Bierman writes:
>> The current draft clearly says that 'mandatory true' refers to the
>> configuration database, not to whether the manager must provide
>> an explicit value.
>> I agree with the interpretation in the current draft.
> 
> Well, you agree with your interpretation of the draft ;^)
> 
> The issue isn't whether a leaf with a default has to appear
> in any particular PDU, but whether a leaf with a default
> "exists" until some{one,thing} creates it.  If leafs (and
> non-presence containers) are automagically created "in the
> configuration database", then configurations become big
> and verbose, which is the opposite of what I want.  So
> I don't want leafs with defaults to be considered "created".
> 
> And when I read the draft with that prespective, it agrees
> with me.  So the draft is underspecified.  What outcome do
> we want and what do need to add to the draft to ensure there
> is only one possible reading of our spec?
> 

It is really up to the DM writer whether they want agent-created
default leafs or not.  I do not care about containers as much,
although the principle is the same.

There is no auto-magic.
The logic is very simple when a leaf value is not provided by the manager:

Q1: Is the leaf mandatory?

   No:  processing is done, node is not instantiated in the agent

  Yes:  Q2: Is there a default-stmt for the leaf, or if not, is there
            a default-stmt for the typedef used by the leaf?

          No: missing mandatory data error

         Yes: use the default value to instantiate the leaf node



> Thanks,
>  Phil
> 
> 

Andy


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