Re: [netmod] PYANG refine fault ?

Mahesh Jethanandani <mjethanandani@gmail.com> Wed, 09 October 2019 21:13 UTC

Return-Path: <mjethanandani@gmail.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 EB31312084F for <netmod@ietfa.amsl.com>; Wed, 9 Oct 2019 14:13:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 BC-rA1gCMcyn for <netmod@ietfa.amsl.com>; Wed, 9 Oct 2019 14:13:57 -0700 (PDT)
Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C0827120043 for <netmod@ietf.org>; Wed, 9 Oct 2019 14:13:57 -0700 (PDT)
Received: by mail-pg1-x534.google.com with SMTP id p1so2226974pgi.4 for <netmod@ietf.org>; Wed, 09 Oct 2019 14:13:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=CHISGbRB5KVoew7enA6xP/XwELi3oW4der7JDzOo+AU=; b=S7euCYo69IKWfciU+OlM0PyuEe2TaDt/nqv6PJfpB5Puowx2ukoBloZ3qZ3gE84fcX hfHsqrJsVFJ8zdF2ewKS41yjuoYJcameVRfRrqFJhni45WsZFZExc20fhhVY8dM90b8p goYFAT2IIaTGNKH1iYnt4mspIUuheerr4LslW0QUz7kcClzRO+iEhyct43jKzv40u46h AfQ2pIryHTEBHLARqN9J+O0/Yoyna2cArqGjCmQQvU4Pi1MTsAtP8RcBOWIfsBZFHYPE hl4m4ZiNfa4HuY6TMpYN2eUXZUyvVnEwCW7XQEE1qjwK/6EsDp86Z59MDr/ahkIt1d19 YlEg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=CHISGbRB5KVoew7enA6xP/XwELi3oW4der7JDzOo+AU=; b=p9PMRwTdakFlszwYfDYyk32dDm6SK4Wgt70/lJ+j+PtgNw+F8OIxSl31XAGT5O8wIG E6+SEsE2EcRkr7a4FGYcPuh29zBl+6oUAimEhJDQuJGRs0g0X5+l6ZDLMuoQjer456cl Hgf+TUCIwrdJfg3oeRgRPZAzc4dZYsHn5ZqUcVuYvhx08+IS5sGnKjaJhZI2oY+CvPBs zncwmOavK9pABrHXbFAN/qzJ4ObvlQoJsjMRYRw9eoN5UXOVbb0dyorpsRMhTutRYoXz yZiJdvsAGpDJwHnqCkDlXE7VcXb4UiTHQzzzfA7bd+SmywiVwdrW6qiWqW8kZq07QLqd kElw==
X-Gm-Message-State: APjAAAVbzetvbDa3LQnhxbJmqBJqlwAJfIKyLJdoOwyBmd0QwLVxpFHP sfvBFciE4jfuFwy0v1WxW+c=
X-Google-Smtp-Source: APXvYqyljxoKiZe/8DvYv4ADFbYvHleO3Jx7KrqRJYlpkEb22dCBW86Od3Jih1TYAKU0HwKNrl5dKA==
X-Received: by 2002:a63:a357:: with SMTP id v23mr6480295pgn.383.1570655636968; Wed, 09 Oct 2019 14:13:56 -0700 (PDT)
Received: from [10.33.123.155] ([66.170.99.2]) by smtp.gmail.com with ESMTPSA id 4sm3032091pja.29.2019.10.09.14.13.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Oct 2019 14:13:56 -0700 (PDT)
From: Mahesh Jethanandani <mjethanandani@gmail.com>
Message-Id: <392C0EBE-FAAA-48DE-A3A1-C94A1E21AE59@gmail.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_A68F32F3-FD90-4CB7-83AC-428DC0083694"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
Date: Wed, 09 Oct 2019 14:13:55 -0700
In-Reply-To: <VI1PR0701MB228606A53C57F383B24C21E2F0950@VI1PR0701MB2286.eurprd07.prod.outlook.com>
Cc: "netmod@ietf.org" <netmod@ietf.org>
To: Balázs Lengyel <balazs.lengyel=40ericsson.com@dmarc.ietf.org>
References: <VI1PR0701MB228606A53C57F383B24C21E2F0950@VI1PR0701MB2286.eurprd07.prod.outlook.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/zAAjLMXqYeGQ8FP2D_SNAEdZIc0>
Subject: Re: [netmod] 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: Wed, 09 Oct 2019 21:14:00 -0000

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