Re: [netmod] [netconf] yanglint errors for ietf-subscribed-notifications

Balázs Lengyel <balazs.lengyel@ericsson.com> Mon, 16 March 2020 07:50 UTC

Return-Path: <balazs.lengyel@ericsson.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 D95DB3A20A2; Mon, 16 Mar 2020 00:50:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.1
X-Spam-Level:
X-Spam-Status: No, score=-2.1 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.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 dZ17o8Aj8r_t; Mon, 16 Mar 2020 00:50:41 -0700 (PDT)
Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20047.outbound.protection.outlook.com [40.107.2.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 995623A20A1; Mon, 16 Mar 2020 00:50:40 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bp1o1RdHptwedtAuRUehnqAR6kuc2WcB3mi5XgpNXrLTU+jrFk+MpvFXZzKZMSImGpWw3DGn4oPGARL/Yst/s0G9RNDZKJXrH4raSXlGOaoJbhzzeSsUL7ms/aDfbkYbZK2VpiP5Y5pzyl95XmYjEKdb3KhobpSeBCvwvZKduCAxr4JH3ai6JCUD5oMr4088pXyPxtY4GRG2Le7TBRkKj1Este+gAGZdKnwdnunRVj6WJkJMiG46nCbNsw6MQPVCD7Q7nGAP40Kva3LeRiMO0VGTfQ0DAeBfjA9rbShOBF67yitp4TYbulFGeqLUZuDKvevFmCAFpiJOpWfbpZdvdg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;bh=zykn+1sID7E1ODA/no0gin7HPfY6keOyzYCvj+3TJVs=; b=DQ8NqDZHjq1Rlel1KIlFiDxrHwWzgdPJkzoRubkAkBEzdEtKNKJQg/G6fVY4RRReJfsWwF3WG1FKZRRLv7YxFl+ovA4Xur4BORtaS8rB9b1sBCQ3BWY9Knspv84vZZZyYNybdvwoJpxKzYUmnwX3WGNQz8tQ0PJ25CYTWM9J/FMiuUSXJiROMNu8/+olgBdXMvMh56VixCDCqhQ+aLIxg8dys/48LBRpd1cc8eUaJvLc8iS9h4b5I4KFRTsbXjjy0iVPbE4F2q9se/kTnyK00ib0zWJav7dcW3ff5L6tK60fbgHliS2zoBBM0N7lK0t8Gp61hrRDqEP6QB1avu0TqQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;bh=zykn+1sID7E1ODA/no0gin7HPfY6keOyzYCvj+3TJVs=; b=d5+45H0ULy5fjAVLwn8molHRSrL8QrM0XkJekst/9kt6/twlmNFmRK5WD2EHRhUFkEqZADasuIdDBB3CryWeMvxZOEb7d1VzU/uVz2Jhrdf77SFmvXh1n/OOpM9VfNMERARdOpefNB56UrTJgj99IC4Fkl//roPG2glEroQWIpk=
Received: from DB7PR07MB4011.eurprd07.prod.outlook.com (52.134.97.155) by DB7PR07MB5308.eurprd07.prod.outlook.com (20.178.42.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.10; Mon, 16 Mar 2020 07:50:37 +0000
Received: from DB7PR07MB4011.eurprd07.prod.outlook.com ([fe80::15cf:dc81:c6f4:aa0c]) by DB7PR07MB4011.eurprd07.prod.outlook.com ([fe80::15cf:dc81:c6f4:aa0c%7]) with mapi id 15.20.2835.012; Mon, 16 Mar 2020 07:50:37 +0000
From: Balázs Lengyel <balazs.lengyel@ericsson.com>
To: Mahesh Jethanandani <mjethanandani@gmail.com>, Netconf <netconf@ietf.org>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netconf] yanglint errors for ietf-subscribed-notifications
Thread-Index: AQHV+XQHyIeyMd7IMUKMdREgjD/wEahK2nPg
Date: Mon, 16 Mar 2020 07:50:37 +0000
Message-ID: <DB7PR07MB4011F0385B8C97F2FF4104F6F0F90@DB7PR07MB4011.eurprd07.prod.outlook.com>
References: <E3909A5A-FACB-4A77-B57A-21E71C01436E@gmail.com>
In-Reply-To: <E3909A5A-FACB-4A77-B57A-21E71C01436E@gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=balazs.lengyel@ericsson.com;
x-originating-ip: [80.98.254.17]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: de471155-afa7-49a5-babb-08d7c97eb78f
x-ms-traffictypediagnostic: DB7PR07MB5308:
x-microsoft-antispam-prvs: <DB7PR07MB530884FC00C9A1B57AB1BD00F0F90@DB7PR07MB5308.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:6108;
x-forefront-prvs: 03449D5DD1
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(39860400002)(346002)(366004)(376002)(136003)(199004)(71200400001)(966005)(110136005)(85202003)(76116006)(316002)(66574012)(66946007)(478600001)(85182001)(186003)(26005)(9686003)(55016002)(52536014)(33656002)(2906002)(6506007)(66616009)(66476007)(64756008)(66446008)(66556008)(53546011)(86362001)(7696005)(8676002)(5660300002)(81166006)(81156014)(8936002)(15650500001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR07MB5308; H:DB7PR07MB4011.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1;
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: bLpZZyhI/slLA7m9De1I5CB3pYra6E041BQwbEUTRjvbIWPyXC22WlWHI9r3RdF/FKOZnQEBWCwr9pZTxubUqYDbUWGxpt6B0/kjHEFJhA4LGhWBQRFjwDk+zJUU10AggsEHyR4WQeM6mz9tMCiSIrqJtyzjYsdsXiQRo1VQkxuakaD1w2bOfuKfOcJ5xGSlOKhjAbLx86WMbHPFIrzuTf6X3cqmLSsIy82aQUBX+jvD9Sh/qMHq9PAQjupRWXE22xL6tXy+034GzdbvIWoUIHCWPx+fP2LO1uQv8VfsgDqikbVQKp4MrTEbVF7DF/IJdF88Lu9B8QS9FkbxXBJnAAxvaupwVR/qo9Jcl/o/WBvqxDmY+xsS6crZnJ5/KfVO8+FmrC62QhygN+NBtHmsyXQi5aNfUgidLBi2Wy9OEDm+JrfsFMaPACVfXpfJCO4LDpJzitDITBPzy7VZZ5WSh8yEdJ7UKf4wkjy9qanG8lwfWACtds14bTCAL9BSgiCM
x-ms-exchange-antispam-messagedata: kOAN95A3111wlc3kplk/xoUqi3KHcFOmicvG8FzI2tAn5v7IED8YpiNzzt2Eo0iLHBdHsOG6PDLlSQQXKkO9waSbCsOMhbHH2prnuXUg4W2dlEGeZPkz/JvxvHil7hnC+xeNXOC5JfAjCI5QJVud4g==
x-ms-exchange-transport-forked: True
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="SHA1"; boundary="----=_NextPart_000_00C2_01D5FB6F.7B226150"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: de471155-afa7-49a5-babb-08d7c97eb78f
X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Mar 2020 07:50:37.7567 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: D9s1CnsIPTF/wQKJU91eJJlJbYRzTUOl4GywLZ9vKE9Z2YhDWQCrNc5P0dVzROegPP/Tkxg1OmA5/qbPlGJWpR3rxQHeK+yqOzzbaEspPCs=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR07MB5308
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/-cTWSkZBG2Nuv8btTMAUH9cldbk>
Subject: Re: [netmod] [netconf] yanglint errors for ietf-subscribed-notifications
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: Mon, 16 Mar 2020 07:50:43 -0000

IMO this is a problem with pyang/yanglint not the model. By the way for me pyang 2.2.1 does not indicate an error.

 

Line 381:(379) defines 

typedef stream-ref {

    type leafref {

      path "/sn:streams/sn:stream/sn:name";

This is just a type so it is unknown if it is config=false or true.

 

The only place stream-ref is used is line 591

          type stream-ref {

            require-instance false;

 

According to https://tools.ietf.org/html/rfc7950#section-9.9

If the referring node represents configuration data and the

   "require-instance" property (Section 9.9.3 <https://tools.ietf.org/html/rfc7950#section-9.9.3> ) is "true", the referred

   node MUST also represent configuration.

 

However as the require-instance is false, this should not be a problem.

 

Regards Balazs

P.S> As yanglint does not provide line numbers it is hard to judge what it exactly wants.

 

 

From: netconf <netconf-bounces@ietf.org> On Behalf Of Mahesh Jethanandani
Sent: 2020. március 13., péntek 21:14
To: Netconf <netconf@ietf.org>; netmod@ietf.org
Subject: [netconf] yanglint errors for ietf-subscribed-notifications

 

As I mentioned in the other thread, I am seeing errors while trying to use yanglint to validate examples for modules that import ietf-subscribed-notifications. I see it with ietf-notification-capabilities and with my own draft ietf-https-notif. These errors do not appear with confd. 

 

Using ietf-notification-capabilites and the first example in the -12 version of the draft which I call examples-notification-capabilities-1.xml, and released models for ietf-yang-push and ietf-subscribed-notifications, I see two issues. The first one related to the statement 'required-instance’ in ietf-subscribed-notifications is discussed on the other thread, and I do not want to repeat it here. If I comment out the only instance of ‘required-instance’ in the module, I run into more errors:

 

bash-3.2$ yanglint -s -i -t auto -p /Volumes/External/git/iana/yang-parameters/ ietf-system-capabilities@2020-03-08.yang <mailto:ietf-system-capabilities@2020-03-08.yang>  ietf-notification-capabilities@2020-03-09.yang <mailto:ietf-notification-capabilities@2020-03-09.yang>  examples-notification-capabilities-1.xml 

err : The leafref leaf is config but refers to a non-config leaf. (/ietf-subscribed-notifications:subscriptions/subscription/target/stream/stream)

err : Invalid value "subscription-policy" of "uses". (/ietf-subscribed-notifications:subscriptions/subscription/subscription-policy)

err : Copying data from grouping failed. (/ietf-subscribed-notifications:subscriptions/subscription/subscription-policy)

err : Module "ietf-subscribed-notifications" parsing failed.

err : Importing "ietf-subscribed-notifications" module into "ietf-yang-push" failed.

err : Module "ietf-yang-push" parsing failed.

err : Importing "ietf-yang-push" module into "ietf-notification-capabilities" failed.

err : Module "ietf-notification-capabilities" parsing failed.

 

While pyang gives the following error:

 

bash-3.2$  pyang -f tree ietf-subscribed-notifications@2019-09-09.yang <mailto:ietf-subscribed-notifications@2019-09-09.yang>  > ietf-subscribed-notifications@2019-09-09-tree.txt <mailto:ietf-subscribed-notifications@2019-09-09-tree.txt> 

ietf-subscribed-notifications@2019-09-09.yang <mailto:ietf-subscribed-notifications@2019-09-09.yang> :381: error: the path for stream is config but refers to a non-config leaf "name" defined at ietf-subscribed-notifications@2019-09-09.yang <mailto:ietf-subscribed-notifications@2019-09-09.yang> :1046

 

Have other encountered this error? If we agree this is an error, is there a -bis to fix this?

 

Thanks.

 

Mahesh Jethanandani

mjethanandani@gmail.com <mailto:mjethanandani@gmail.com>