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-boun...@ietf.org> On Behalf Of Mahesh Jethanandani Sent: 2020. március 13., péntek 21:14 To: Netconf <netc...@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-capabilit...@2020-03-08.yang <mailto:ietf-system-capabilit...@2020-03-08.yang> ietf-notification-capabilit...@2020-03-09.yang <mailto:ietf-notification-capabilit...@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-notificati...@2019-09-09.yang <mailto:ietf-subscribed-notificati...@2019-09-09.yang> > ietf-subscribed-notificati...@2019-09-09-tree.txt <mailto:ietf-subscribed-notificati...@2019-09-09-tree.txt> ietf-subscribed-notificati...@2019-09-09.yang <mailto:ietf-subscribed-notificati...@2019-09-09.yang> :381: error: the path for stream is config but refers to a non-config leaf "name" defined at ietf-subscribed-notificati...@2019-09-09.yang <mailto:ietf-subscribed-notificati...@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 mjethanand...@gmail.com <mailto:mjethanand...@gmail.com>
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ netmod mailing list netmod@ietf.org https://www.ietf.org/mailman/listinfo/netmod