Re: [netmod] ?==?utf-8?q? PYANG refine fault ?

Martin Bjorklund <mbj@tail-f.com> Thu, 10 October 2019 08:08 UTC

Return-Path: <mbj@tail-f.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 78EE212004A for <netmod@ietfa.amsl.com>; Thu, 10 Oct 2019 01:08:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAD_ENC_HEADER=0.001, BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u534-31trmQ3 for <netmod@ietfa.amsl.com>; Thu, 10 Oct 2019 01:08:45 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 9070F12004D for <netmod@ietf.org>; Thu, 10 Oct 2019 01:08:45 -0700 (PDT)
Received: from localhost (unknown [173.38.220.41]) by mail.tail-f.com (Postfix) with ESMTPSA id 847B51AE03DD; Thu, 10 Oct 2019 10:03:14 +0200 (CEST)
Date: Thu, 10 Oct 2019 10:02:48 +0200 (CEST)
Message-Id: <20191010.100248.223801825705590762.mbj@tail-f.com>
To: mvasko@cesnet.cz
Cc: mjethanandani@gmail.com, balazs.lengyel=40ericsson.com@dmarc.ietf.org, netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <1830-5d9ed700-15-5e6ae300@76090108>
References: <392C0EBE-FAAA-48DE-A3A1-C94A1E21AE59@gmail.com> <1830-5d9ed700-15-5e6ae300@76090108>
X-Mailer: Mew version 6.8 on Emacs 25.2
Mime-Version: 1.0
Content-Type: Text/Plain; charset=utf-8
Content-Transfer-Encoding: base64
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/hvTeFgdwpJszavLScCE49BguKJI>
Subject: Re: [netmod] ?==?utf-8?q? PYANG refine fault ?
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 10 Oct 2019 08:08:49 -0000

Michal Vaško <mvasko@cesnet.cz>; wrote:
> Hi,
> 
> yanglint actually validates the module just fine (at least the latest
> version) once the grammar errors are fixed. Namely, the spaces before
> ";" on lines 191 and 199 are removed.

These are not errors.  You are allowed to have any number of
whitespace (and comments) before the ';'.


/martin


> 
> Regards,
> Michal
> 
> On Wednesday, October 9, 2019 23:13 CEST, Mahesh Jethanandani
> <mjethanandani@gmail.com>; wrote:
>  
> > Hi Balasz,
> > 
> > In general support of unions is poor across the tool sets that I have
> > used. It does not help that yanglint gives a completely different
> > error.
> > 
> > I did try yanger, and that did not result in an error.
> > 
> > The other option is to move the default statement inside the grouping,
> > which seems to make the error go away.
> > 
> > Cheers.
> > 
> > > On Oct 9, 2019, at 8:01 AM, Balázs Lengyel
> > > <balazs.lengyel=40ericsson.com@dmarc.ietf.org>; wrote:
> > > 
> > > Hello,
> > > I was trying to validate the attached model. However pyang keeps
> > > complaining about refining a default for a leaf-list:
> > >  
> > > ietf-notification-capabilities@2019-10-10.yang
> > > <mailto:ietf-notification-capabilities@2019-10-10.yang>:184: error:
> > > "leaf-list" node
> > > "ietf-notification-capabilities::supported-excluded-change-type"
> > > cannot be refined with "default"
> > >  
> > > Why? According to https://tools.ietf.org/html/rfc7950#section-7.13.2
> > > <https://tools.ietf.org/html/rfc7950#section-7.13.2> “A leaf-list node
> > > may get a set of default values ...”
> > > .
> > > Confdc accepts this. Could this be a bug in pyang ?
> > > Regards Balazs
> > >  
> > > -- 
> > > Balazs Lengyel Senior Specialist Ericsson Hungary Ltd.
> > > Mobile: +36-70-330-7909 email: Balazs.Lengyel@ericsson.com
> > > <mailto:Balazs.Lengyel@ericsson.com>
> > >  
> > > <ietf-notification-capabilities@2019-10-10.yang>_______________________________________________
> > > netmod mailing list
> > > netmod@ietf.org <mailto:netmod@ietf.org>
> > > https://www.ietf.org/mailman/listinfo/netmod
> > > <https://www.ietf.org/mailman/listinfo/netmod>
> > Mahesh Jethanandani
> > mjethanandani@gmail.com
> > 
> > 
> > 
>  
>  
> 
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod