[netconf] Require-instance problem [was: RE: WGLC: draft-ietf-netconf-notification-capabilities-11]

Balázs Lengyel <balazs.lengyel@ericsson.com> Fri, 13 March 2020 08:55 UTC

Return-Path: <balazs.lengyel@ericsson.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5723B3A1418; Fri, 13 Mar 2020 01:55:11 -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 n6s4Xu4G5Cyh; Fri, 13 Mar 2020 01:55:09 -0700 (PDT)
Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10073.outbound.protection.outlook.com [40.107.1.73]) (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 C350A3A1416; Fri, 13 Mar 2020 01:55:08 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=numMWDOUZzWzK5CFoALjlIy3WArCSLQhAdMZEz4X22g93SNr9/ayi8MjWFGqvfCJtshij4d+mFxZmGXF5L3Gw67E/RA8c5pD0VAtt3DsJEb2upEJdZN9uBQ/ybbn1WWLClUkxrS4XZM6wG4BrCMqXfkN33PLA9o7MfpRmAuollDtRrqElWC8+adCe+tssd2EdKhBzXq8oqzuTn+qxKJ7QocJCIDNgIupWIAIGJA+c+6IRvd+rpxw0J7jJpvGGev3JX8Y9D+VILRdP10PtELDI6K6qDT629VXoB0SjaDTEzYJXT1QK5r7QsitHB6aXN+uKpdl9YAteSac5dC3b3D6TQ==
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=nz0tpcGp9NGeeWHG/2bpxKhnrao+gXKgpRTp2BcoISk=; b=Zo/ey3uUxVdbc+GzCtvQKL4HrTSxFsTE6qh/GlooixsvajZuyQI4/6ZNsEpq9vdYqLNKHQdSkcB5gT+vo7T6sqHPCfAOIRF7HKWJzeuYAT3N+cylLuMuP35ABZxoCevRPrDRktI+TFJpyy8OvrK+0byYYpdqBIlsL7PKntZkPiTDd9eHQ1umv84fwY4FEpyEo9RZQLbqQxi5JvQXrmDzUh2ONmeDjCZjeVTpGURWUpzdAjA+OmiP9TnpMcU5kfcUHpUnWgx3YqAlU9sY7Xu3UG50BdFrXSsnwZmvU2t21VH3V5Lwj0XB0DH2SnS27zmRYcS1PaIz/8xX9q7yCEKr6g==
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=nz0tpcGp9NGeeWHG/2bpxKhnrao+gXKgpRTp2BcoISk=; b=fMmEa5DS5htQmyou5wdP9Z12Ysg4tuaBzQv5NX1QRsAIY1PhugpztK0CqOepn6Nfo6atxqERMRdDhFzK6paJEYMaAlyGLcDFqX8Sx54nG3yFOmmFJe33jHF2cePLr8gEwtEhkfEjHtfO9A8ANmjB3LD5XZwzuH+Je6oEf5PDlZo=
Received: from DB7PR07MB4011.eurprd07.prod.outlook.com (52.134.97.155) by DB7PR07MB4699.eurprd07.prod.outlook.com (52.135.138.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.9; Fri, 13 Mar 2020 08:55:04 +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.2814.007; Fri, 13 Mar 2020 08:55:04 +0000
From: Balázs Lengyel <balazs.lengyel@ericsson.com>
To: Mahesh Jethanandani <mjethanandani@gmail.com>
CC: Kent Watsen <kent+ietf@watsen.net>, "netconf@ietf.org" <netconf@ietf.org>, "yang-doctors@ietf.org" <yang-doctors@ietf.org>
Thread-Topic: Require-instance problem [was: RE: [netconf] WGLC: draft-ietf-netconf-notification-capabilities-11]
Thread-Index: AdX5FQ8P15pEMDmsTdqbEEUFygvENA==
Date: Fri, 13 Mar 2020 08:55:04 +0000
Message-ID: <DB7PR07MB4011D375898BD9B8DD213135F0FA0@DB7PR07MB4011.eurprd07.prod.outlook.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: fda32f9c-beb2-4af4-1440-08d7c72c3908
x-ms-traffictypediagnostic: DB7PR07MB4699:
x-microsoft-antispam-prvs: <DB7PR07MB46996F0DE81EF47C0041DA41F0FA0@DB7PR07MB4699.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:317;
x-forefront-prvs: 034119E4F6
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(396003)(376002)(39860400002)(136003)(346002)(199004)(52536014)(33656002)(66556008)(26005)(186003)(66616009)(5660300002)(66946007)(66476007)(66446008)(9686003)(64756008)(76116006)(8676002)(86362001)(55016002)(71200400001)(15650500001)(966005)(19273905006)(2906002)(6916009)(4326008)(478600001)(66574012)(85202003)(9326002)(85182001)(81156014)(7696005)(53546011)(6506007)(81166006)(8936002)(316002)(54906003)(563064011); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR07MB4699; 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: KJhXdU4mWwo2HYSxu8tiYtnopRWlzc/Fs0AnAIn4epDb19Z56H0PJDaV7yIiVP8RNqMr6fbMSSrUDAIHL1J1+2v1XS/eLBXoQdSVo5XwDxXGjq0qGZH6ffdBLA+UWR/NMNSWAy/XEh7eJffbljIXqYd71sa6Mp2QnqITpU0qOtr8PAcqRxPn5tecHEu0rkHLgjKaCJ1NGsF8FBEH6XU86mG4krVDpUHkaTYBph4ZqE751NReeNAgt3IfZnlE9kfSsGdtsunoOOAwEDOTyYOl7ZZD9wFBKi2YNnukzX9daFsOeU5/E0egvGym2q6+9MQFz9Dl6TQq6KKKsTX/0w3x22r0jn349nJtMa2FbvPbtcMUBxE1v/JH+Zr6WPduyQy3QYCGKyjGYY34AgYWLz/Jrkpd0yQO0BCE9F8P4XBQ7EodrsVW9AtSNcQN3qeSYfCJFRnE0jr2KL7HSXzcd3UKovUEAEIgn6Tw9ecEK7wtx5SCOUS5iqduNNp2yRyLKb+4qG9AyUWYp3nplzr+xNobfYpRLKXNhb5RlVttMIKaS28lF/O0yBykAYyPoEG+gNgr
x-ms-exchange-antispam-messagedata: 2hBigm01c7Aogakh4MwACfU65+17fUInbq5yYiGReP+K5kctW3VHb2UlQb2y7Td92A+GLzq9UWaM++wL1P1Tgcs4f2l/35/CvQaqrAnWMTnCBr9/KMPKjPhd1DbyhWPxAZ3Ml2BCXb5zGzqxkMkliQ==
x-ms-exchange-transport-forked: True
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="SHA1"; boundary="----=_NextPart_000_0045_01D5F91D.77654130"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: fda32f9c-beb2-4af4-1440-08d7c72c3908
X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Mar 2020 08:55:04.4704 (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: zvnHrzQpkrwVUSIwn0kjg4iv28Qi9to/llxWAd0EiNtvuulrR8eqGJUITIVBMq9wEnT4vUjDVbr3ZHaA778fbXDfy8hJUmLjZLGQyjXoWuE=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR07MB4699
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/s-lEy4tpD6n4IeftSiIeR1129Ig>
Subject: [netconf] Require-instance problem [was: RE: WGLC: draft-ietf-netconf-notification-capabilities-11]
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Mar 2020 08:55:12 -0000

Hello Mahesh,

Even if there is some problem with ietf-subscribed-notification how does that effect the validity of instance data for ietf-system-capabilities or ietf-notification-capabilities ? I only import a type and a feature from Yangpush (which imports subscribed notification). These seem nothing to do with require-instance.

 

Aside from my draft:

I do not understand some of libyangs statements:  

“as it turned out (ref <https://tools.ietf.org/html/rfc7950#section-9.9.3> ), you cannot put require-instance into a derived type”. 

Checking ref I did not find why you cannot put require instance into a typedef.

 

By the way I have bigger issues with YangValidator. When I load ietf-system-capabilities@2020-03-08 into it I get 

 

RecursionError at /yangvalidator/validator

maximum recursion depth exceeded


Request Method:

POST


Request URL:

http://www.yangvalidator.com/yangvalidator/validator


Django Version:

3.0.4


Exception Type:

RecursionError


Exception Value:

maximum recursion depth exceeded


Exception Location:

/home/yang/yangvalidator/lib/python3.6/site-packages/pyang-2.1.1-py3.6.egg/pyang/statements.py in newf, line 42


Python Executable:

/usr/sbin/uwsgi


Python Version:

3.6.10


Python Path:

['/home/yang/yangvalidator/lib/python3.6/site-packages/pyang-2.1.1-py3.6.egg/pyang/transforms',

 

Regards Balazs

 

From: Mahesh Jethanandani <mjethanandani@gmail.com> 
Sent: 2020. március 12., csütörtök 22:28
To: Balázs Lengyel <balazs.lengyel@ericsson.com>
Cc: Kent Watsen <kent+ietf@watsen.net>; netconf@ietf.org; yang-doctors@ietf.org
Subject: Re: [netconf] WGLC: draft-ietf-netconf-notification-capabilities-11

 

[Adding yang-doctors]

 

Hi Balazs,

 

 

On Mar 10, 2020, at 2:06 AM, Balázs Lengyel <balazs.lengyel@ericsson.com <mailto:balazs.lengyel@ericsson.com> > wrote:

 

Finally, have all the examples in the appendix been validated?

BALAZS: Yes, they have been loaded into a live Confd server.

 

I bring this up because I ran into issues when validating the https-notif model using ietf-subscribed-notification module, something that you also import. Here is what I see when I try to use yanglint to validate your example. In this case, I named your example as examples-notification-capabilities-1.xml.

 

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 : Invalid keyword "require-instance".

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.

 

At first I thought the issue was with yanglint, because just like you I used confd and it did not complain. But folks over at libyang tell me that this was discussed as part of their issue  #881 <https://protect2.fireeye.com/v1/url?k=a6420c80-fa9605e6-a6424c1b-8610d8a762ca-d6cddc5edf1151a7&q=1&e=3cd8e8af-8aea-4f96-939b-8e1e455eac74&u=https%3A%2F%2Fgithub.com%2FCESNET%2Flibyang%2Fissues%2F881>  and the conclusion was that you cannot put require-instance in a derived type based on this <https://tools.ietf.org/html/rfc7950#section-9.9.3>  text.

 

Who is correct in their assertion, libyang or confd/RFC8639?

 

In case anyone is wondering which ietf-subsciribed-notifications module is being imported, here it is:

 

bash-3.2$ ls ../iana/yang-parameters/ietf-subscribed-notifications@2019-09-09.yang <mailto:iana/yang-parameters/ietf-subscribed-notifications@2019-09-09.yang> 

 

Cheers.

 

BTW, even if I comment out the ‘require-instance’ statement, yanglint complains about other issues with ietf-subscribed-notifications, which I will bring up in a separate thread.

 

Mahesh Jethanandani

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