Subject: [netmod] Problems with lint validation

From: Balázs Lengyel <[email-masked]>
Date: Tue, 13 Aug 2019 15:32:27 +0000

Hello,

I validated my model [email-masked]
<mailto:[email-masked]>  with
yangvalidator.com. My model seems fine, but I got a lot of errors from lint:

yanglint Validation

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

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

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

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

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 least some of these are not really errors. (pyang, confdc accepts them)

E.g.  the first error is not true because the leafref has require-instance
false.

It would be nice if this could be corrected. I got the same messages from
the draft submission tool too.

Regards Balazs

---

From: "Reshad Rahman (rrahman)" <[email-masked]>
Date: Tue, 13 Aug 2019 17:24:05 +0000

Balazs, we ran into the same issue last year. If you look at the ticket in the attached email, yanglint has a fix for the non-config leaf issue but OpenSUSE doesn’t have a version of libyang with the fix.

Regards,
Reshad.

From: netmod <[email-masked]> on behalf of Balázs Lengyel <[email-masked]>
Date: Tuesday, August 13, 2019 at 11:33 AM
To: "[email-masked]" <[email-masked]>, "[email-masked]'" <[email-masked]>
Subject: [netmod] Problems with lint validation

Hello,
I validated my model [email-masked]<mailto:[email-masked]> with yangvalidator.com. My model seems fine, but I got a lot of errors from lint:

yanglint Validation
err : The leafref leaf is config but refers to a non-config leaf. (/ietf-subscribed-notifications:subscriptions/subscription/target/stream/stream)
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.

At least some of these are not really errors. (pyang, confdc accepts them)
E.g.  the first error is not true because the leafref has require-instance false.

It would be nice if this could be corrected. I got the same messages from the draft submission tool too.

Regards Balazs

Subject: [ietfdb] #2667 (Datatracker: Yang): Newer version of yanglint needed for YANG validation
From: ietfdb issue tracker <[email-masked]>
To: <[email-masked]>
Cc: <[email-masked]>, <[email-masked]>
Date: Wed, 19 Dec 2018 21:32:58 +0000

#2667: Newer version of yanglint needed for YANG validation

 So datatracker still has yanglint showing these errors for
 https://datatracker.ietf.org/doc/draft-ietf-netconf-subscribed-
 notifications:
 yanglint 0.14.80: yanglint --verbose -p {rfclib} -p {draftlib} -p {tmplib}
 {model} -i:
 err : The leafref leaf is config but refers to a non-config leaf. (/ietf-
 subscribed-notifications:subscriptions/subscription/target/stream/stream)

 This is due to issue below which was fixed in yanglint in 0.16.59
 https://github.com/CESNET/libyang/issues/644

 So we need datatracker to use a more recent version of yanglint.

 Regards,
 Reshad.

-- 
-------------------------------+--------------------
 Reporter:  [email-masked]  |      Owner:
     Type:  enhancement        |     Status:  new
 Priority:  major              |  Milestone:  (None)
Component:  Datatracker: Yang  |    Version:
 Keywords:  sprint             |
-------------------------------+--------------------

Ticket URL: <https://tools.ietf.org/tools/ietfdb/ticket/2667>
ietfdb <https://tools.ietf.org/tools/ietfdb/>