Closed vaniatoperich closed 1 year ago
It is definitely not YDK issue. The failure appears in libyang library when processing YANG statement 'enum +;'. Based on YANG-1.1 RFC-7950:
The "enum" statement, which is a substatement to the "type"
statement, MUST be present if the type is "enumeration". It is
repeatedly used to specify each assigned name of an enumeration type.
It takes as an argument a string that is the assigned name.
the enum argument must be a string and libyang expects that the string value is enclosed in double quotes. For some reason the XE YANG model developers starting from release 17.2.x dropped the double quotes in enum statements, which basically violates the RFC.
As a workaround I suggest edit file ~/.ydk/
Issue tracker is ONLY used for reporting bugs. Please use the YDK Community for any support issues.
Expected Behavior
I would expect to be able to load Native module and use it to read/write from Cisco device on either 16.12.08 or 17.06.04 versions
Current Behavior
On IOS versions 17.06.04 or 17.10.01 I am not able to load the yang modules, I get the following error:
However, version 16.12.08 works without any issues. Seems that Yang models are placed in /root/.ydk/192.168.1.142. If this folder exists and has yang models from 16.12.08 version, and switch gets upgraded to 17.06.04, YDK works as "old" models are kept and not overwritten. If I however remove the folder and start from scratch, I get error. I tested also with 17.10.01 which exhibits the same issue...
I am generating python bindings using ydk-gen, however this seems to be an issue of specific version of models.
Steps to Reproduce
Your Script
Logs
Enable logging and post the logs below
System Information
python 3.8.10 os: Ubuntu 20.04 x86_64
Additional info
pyang produces following warning however bundle is generated successfully