[YANG] new pyang errors

Andy Bierman <andy@andybierman.com> Fri, 18 January 2008 17:03 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 1JFucp-00027q-B7; Fri, 18 Jan 2008 12:03:27 -0500
Received: from yang by megatron.ietf.org with local (Exim 4.43) id 1JFuco-00027k-G2 for yang-confirm+ok@megatron.ietf.org; Fri, 18 Jan 2008 12:03:26 -0500
Received: from [10.90.34.44] (helo=chiedprmail1.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1JFuco-00027X-55 for yang@ietf.org; Fri, 18 Jan 2008 12:03:26 -0500
Received: from smtp120.sbc.mail.sp1.yahoo.com ([69.147.64.93]) by chiedprmail1.ietf.org with smtp (Exim 4.43) id 1JFucn-0001K6-Ml for yang@ietf.org; Fri, 18 Jan 2008 12:03:26 -0500
Received: (qmail 29935 invoked from network); 18 Jan 2008 17:03:22 -0000
Received: from unknown (HELO andrew-biermans-computer.local) (andybierman@att.net@67.126.240.103 with plain) by smtp120.sbc.mail.sp1.yahoo.com with SMTP; 18 Jan 2008 17:03:22 -0000
X-YMail-OSG: IfUacqUVM1mYI7i8rmRUj66plHiAcnTMtFTm9aI70lRN6snr
X-Yahoo-Newman-Property: ymail-3
Message-ID: <4790DD1E.7090807@andybierman.com>
Date: Fri, 18 Jan 2008 09:08:46 -0800
From: Andy Bierman <andy@andybierman.com>
User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031)
MIME-Version: 1.0
To: yang@ietf.org
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 97adf591118a232206bdb5a27b217034
Subject: [YANG] new pyang errors
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

Hi,

I notice the new version of pyang says it is
an error to have a mandatory leaf with a default.

I don't agree with this interpretation.
There is no other way to support an agent-supplied default.

  leaf foo {
    mandatory true;
    default 7;
    type int32;
  }

  leaf bar {
    mandatory false;
    default 7;
    type int32;
  }


The leaf 'foo' is created by the agent with the value 7
if the manager tries to set the <running/> config
without it.  Mandatory means it must be present in a
valid config, not that the manager must set some value.

The leaf 'bar' has an irrelevant default clause that
will never be used because the leaf is optional and
the agent will not create it.

I think the CLR is backwards, but none is really needed here at all.


Andy


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