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; =?utf-8?q?b=3Dbp1o1RdHptwedtAuRUehnqAR6kuc2WcB3mi5XgpNXrLTU+jrFk+MpvFXZzKZM?= =?utf-8?q?SImGpWw3DGn4oPGARL/Yst/s0G9RNDZKJXrH4raSXlGOaoJbhzzeSsUL7ms/aDfbk?= =?utf-8?q?YbZK2VpiP5Y5pzyl95XmYjEKdb3KhobpSeBCvwvZKduCAxr4JH3ai6JCUD5oMr408?= =?utf-8?q?8pXyPxtY4GRG2Le7TBRkKj1Este+gAGZdKnwdnunRVj6WJkJMiG46nCbNsw6MQPVC?= =?utf-8?q?D7Q7nGAP40Kva3LeRiMO0VGTfQ0DAeBfjA9rbShOBF67yitp4TYbulFGeqLUZuDKv?= =?utf-8?q?evFmCAFpiJOpWfbpZdvdg=3D=3D?=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; =?utf-8?q?h=3DFrom=3ADate=3ASubject=3AMessage-ID=3ACont?= =?utf-8?q?ent-Type=3AMIME-Version=3AX-MS-Exchange-SenderADCheck=3B?= =?utf-8?q?bh=3Dzykn+1sID7E1ODA/no0gin7HPfY6keOyzYCvj+3TJVs=3D=3B_b=3DDQ8NqD?= =?utf-8?q?ZHjq1Rlel1KIlFiDxrHwWzgdPJkzoRubkAkBEzdEtKNKJQg/G6fVY4RRReJfsWwF3?= =?utf-8?q?WG1FKZRRLv7YxFl+ovA4Xur4BORtaS8rB9b1sBCQ3BWY9Knspv84vZZZyYNybdvwo?= =?utf-8?q?JpxKzYUmnwX3WGNQz8tQ0PJ25CYTWM9J/FMiuUSXJiROMNu8/+olgBdXMvMh56Vix?= =?utf-8?q?CDCqhQ+aLIxg8dys/48LBRpd1cc8eUaJvLc8iS9h4b5I4KFRTsbXjjy0iVPbE4F2q?= =?utf-8?q?9se/kTnyK00ib0zWJav7dcW3ff5L6tK60fbgHliS2zoBBM0N7lK0t8Gp61hrRDqEP?= =?utf-8?q?6QB1avu0TqQ=3D=3D?=
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; =?utf-8?q?h=3DFrom=3ADate=3ASubject=3AMessage-ID=3AContent-Typ?= =?utf-8?q?e=3AMIME-Version=3AX-MS-Exchange-SenderADCheck=3B?= =?utf-8?q?bh=3Dzykn+1sID7E1ODA/no0gin7HPfY6keOyzYCvj+3TJVs=3D=3B_b=3Dd5+45H?= =?utf-8?q?0ULy5fjAVLwn8molHRSrL8QrM0XkJekst/9kt6/twlmNFmRK5WD2EHRhUFkEqZADa?= =?utf-8?q?suIdDBB3CryWeMvxZOEb7d1VzU/uVz2Jhrdf77SFmvXh1n/OOpM9VfNMERARdOpef?= =?utf-8?q?NB56UrTJgj99IC4Fkl//roPG2glEroQWIpk=3D?=
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: =?utf-8?B?QmFsw6F6cyBMZW5neWVs?= <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: =?utf-8?q?=3CDB7PR07MB4011F0385B8C97F2FF4104F6F0F90=40DB7PR07MB4?= =?utf-8?q?011=2Eeurprd07=2Eprod=2Eoutlook=2Ecom=3E?=
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: =?utf-8?q?=3CDB7PR07MB530884FC00C9A1B57AB1BD00F0F?= =?utf-8?q?90=40DB7PR07MB5308=2Eeurprd07=2Eprod=2Eoutlook=2Ecom=3E?=
x-ms-oob-tlc-oobclassifiers: OLM:6108;
x-forefront-prvs: 03449D5DD1
x-forefront-antispam-report: SFV:NSPM; =?utf-8?q?SFS=3A=2810009020=29=284636?= =?utf-8?b?MDA5KSgzOTYwMDMpKDM5ODYwNDAwMDAyKSgzNDYwMDIpKDM2NjAwNCkoMzc2?= =?utf-8?b?MDAyKSgxMzYwMDMpKDE5OTAwNCkoNzEyMDA0MDAwMDEpKDk2NjAwNSkoMTEw?= =?utf-8?q?136005=29=2885202003=29=2876116006=29=28316002=29=2866574012=29?= =?utf-8?b?KDY2OTQ2MDA3KSg0Nzg2MDAwMDEpKDg1MTgyMDAxKSgxODYwMDMpKDI2MDA1KSg5?= =?utf-8?q?686003=29=2855016002=29=2852536014=29=2833656002=29=282906002=29?= =?utf-8?q?=286506007=29=2866616009=29=2866476007=29=2864756008=29=286644600?= =?utf-8?b?OCkoNjY1NTYwMDgpKDUzNTQ2MDExKSg4NjM2MjAwMSkoNzY5NjAwNSkoODY3?= =?utf-8?q?6002=29=285660300002=29=2881166006=29=2881156014=29=288936002=29?= =?utf-8?q?=2815650500001=29=3B?= 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: =?utf-8?q?bLpZZyhI/slLA7m9De1I5CB3pYra6E0?= =?utf-8?q?41BQwbEUTRjvbIWPyXC22WlWHI9r3RdF/FKOZnQEBWCwr9pZTxubUqYDbUWGxpt6B?= =?utf-8?q?0/kjHEFJhA4LGhWBQRFjwDk+zJUU10AggsEHyR4WQeM6mz9tMCiSIrqJtyzjYsdsX?= =?utf-8?q?iQRo1VQkxuakaD1w2bOfuKfOcJ5xGSlOKhjAbLx86WMbHPFIrzuTf6X3cqmLSsIy8?= =?utf-8?q?2aQUBX+jvD9Sh/qMHq9PAQjupRWXE22xL6tXy+034GzdbvIWoUIHCWPx+fP2LO1uQ?= =?utf-8?q?v8VfsgDqikbVQKp4MrTEbVF7DF/IJdF88Lu9B8QS9FkbxXBJnAAxvaupwVR/qo9Jc?= =?utf-8?q?l/o/WBvqxDmY+xsS6crZnJ5/KfVO8+FmrC62QhygN+NBtHmsyXQi5aNfUgidLBi2W?= =?utf-8?q?y9OEDm+JrfsFMaPACVfXpfJCO4LDpJzitDITBPzy7VZZ5WSh8yEdJ7UKf4wkjy9qa?= =?utf-8?q?nG8lwfWACtds14bTCAL9BSgiCM?=
x-ms-exchange-antispam-messagedata: =?utf-8?q?kOAN95A3111wlc3kplk/xoUqi3KHcF?= =?utf-8?q?OmicvG8FzI2tAn5v7IED8YpiNzzt2Eo0iLHBdHsOG6PDLlSQQXKkO9waSbCsOMhbH?= =?utf-8?q?H2prnuXUg4W2dlEGeZPkz/JvxvHil7hnC+xeNXOC5JfAjCI5QJVud4g=3D=3D?=
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: =?utf-8?q?D9s1CnsIPTF/wQKJU91eJ?= =?utf-8?q?JlJbYRzTUOl4GywLZ9vKE9Z2YhDWQCrNc5P0dVzROegPP/Tkxg1OmA5/qbPlGJWpR?= =?utf-8?q?3rxQHeK+yqOzzbaEspPCs=3D?=
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>rg>; 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>