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

Michal Vaško <mvasko@cesnet.cz> Thu, 10 October 2019 06:59 UTC

Return-Path: <mvasko@cesnet.cz>
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 32E6D120046 for <netmod@ietfa.amsl.com>; Wed, 9 Oct 2019 23:59:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.997
X-Spam-Level:
X-Spam-Status: No, score=-1.997 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cesnet.cz
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 C5d9sWWGD70n for <netmod@ietfa.amsl.com>; Wed, 9 Oct 2019 23:59:32 -0700 (PDT)
Received: from kalendar.cesnet.cz (kalendar.cesnet.cz [IPv6:2001:718:1:1f:50:56ff:feee:34]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4FA96120058 for <netmod@ietf.org>; Wed, 9 Oct 2019 23:59:32 -0700 (PDT)
Received: by kalendar.cesnet.cz (Postfix, from userid 999) id 17DEF60169; Thu, 10 Oct 2019 08:59:29 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=kalendar; t=1570690769; bh=+aTo4vFv8HpaVc2GcjydBWqSgXIlrHxKPqdN3yVse2k=; h=In-Reply-To:From:Date:Cc:To:Subject; b=YihE1V66e+ADrDILRWZJlOsEjAO32vy/9B7Oq2hjGyIPIHu37hDak6pVFJrbFIoLe yAbrVgEZcyEpzxbu+0JyGfAc1iTmAGyJ4s3DPWgVO45P1yxpDjeAtrbJ+jF8l+Jtzm hdUNyIZVH2GnRZ0jZwm99qbVtKqxn7s970LV1DMk=
Content-Type: text/plain; charset="utf-8"
In-Reply-To: <392C0EBE-FAAA-48DE-A3A1-C94A1E21AE59@gmail.com>
From: Michal Vaško <mvasko@cesnet.cz>
X-Forward: 84.42.161.20
Date: Thu, 10 Oct 2019 08:59:29 +0200
Cc: Balázs Lengyel <balazs.lengyel=40ericsson.com@dmarc.ietf.org>, "netmod@ietf.org" <netmod@ietf.org>
To: Mahesh Jethanandani <mjethanandani@gmail.com>
MIME-Version: 1.0
Message-ID: <1830-5d9ed700-15-5e6ae300@76090108>
User-Agent: SOGoMail 2.3.23
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/ylBj5QXsqZFbuVsT9h7cqS10ovk>
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 06:59:34 -0000

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.

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
> 
> 
>