Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

[802.3_YANG] Repo for Yanglint examples?

Hi Scott


Is there a git hub repo that I can put some examples of Yanglint?  I came across an issue that had me wrapped around the axel  for a while. I was looking at the 802.1CBcv draft and I had loaded iana-if-type and ieee802-dot1cb-stream-identification.


At this point yanglint had the following loaded modules

> list

List of the loaded models:

              i ietf-yang-metadata@2016-08-05

              I yang@2017-02-20

              i ietf-inet-types@2013-07-15

              i ietf-yang-types@2013-07-15

              i ietf-datastores@2018-02-14

              I ietf-yang-library@2019-01-04

              I ietf-interfaces@2018-02-20

              I iana-if-type@2017-01-19

              i ieee802-types@2019-03-07

              i ieee802-dot1q-types@2018-03-07

              i ieee802-dot1cb-stream-identification-types@2020-08-05

              I ieee802-dot1cb-stream-identification@2020-04-29


However I was getting an error libyang[0]: Identity found, but in a non-implemented module "ieee802-dot1cb-stream-identification-types".

libyang[0]: Failed to resolve identityref "ieee802-dot1cb-stream-identification-types:null-stream-identification". (path: /ieee802-dot1cb-stream-identification:stream-identity-list[index='1']/identification-type)


When I manually loaded ieee802-dot1cb-stream-identification-types (which was already loaded according to list) the problem went away!

I found a reference to the error that there may be a order dependency in Libyang.


Moral of the story is load all module you think you need.

By the way Im also starting to use the @date notation for modules as a way to keep track of them. We are not publishing them that way but pyang will happily process them if you append the revision date from the file to the end (as above).  E.g. ieee802-dot1cb-stream-identification-types@2020-08-05.  The tools seem to pick the latest version in the directory too which is handy.








To unsubscribe from the STDS-802-3-YANG list, click the following link: