pyangbind icon indicating copy to clipboard operation
pyangbind copied to clipboard

Unable to build module from Cisco-IOS-XE-native

Open rgrueebler opened this issue 4 years ago • 1 comments

Hi everyone

I try to generate a python class from the Cisco-IOS-XE-native yang model. Unfortunately, I get the following error:

Cisco-IOS-XE-native.yang:2422 (at Cisco-IOS-XE-ip.yang:1798): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2422 (at Cisco-IOS-XE-ip.yang:1801): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2422 (at Cisco-IOS-XE-ip.yang:3108): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2422 (at Cisco-IOS-XE-ip.yang:3164): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2422 (at Cisco-IOS-XE-ip.yang:3649): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-ip.yang:3667: error: "Cisco-IOS-XE-ip:native" in the path for Tunnel at Cisco-IOS-XE-native.yang:2422 (at Cisco-IOS-XE-ip.yang:3663) is not found
Cisco-IOS-XE-ip.yang:3675: error: "Cisco-IOS-XE-ip:native" in the path for Tunnel at Cisco-IOS-XE-native.yang:2422 (at Cisco-IOS-XE-ip.yang:3671) is not found
Cisco-IOS-XE-native.yang:2444 (at Cisco-IOS-XE-ipv6.yang:405): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ipv6"
Cisco-IOS-XE-native.yang:2444 (at Cisco-IOS-XE-ipv6.yang:430): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ipv6"
Cisco-IOS-XE-native.yang:2741 (at Cisco-IOS-XE-logging.yang:227): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-logging"
Cisco-IOS-XE-native.yang:2741 (at Cisco-IOS-XE-logging.yang:236): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-logging"
Cisco-IOS-XE-native.yang:2741 (at Cisco-IOS-XE-logging.yang:666): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-logging"
Cisco-IOS-XE-native.yang:2741 (at Cisco-IOS-XE-logging.yang:721): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-logging"
Cisco-IOS-XE-native.yang:2741 (at Cisco-IOS-XE-logging.yang:853): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-logging"
Cisco-IOS-XE-native.yang:2741 (at Cisco-IOS-XE-logging.yang:915): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-logging"
Cisco-IOS-XE-native.yang:2741 (at Cisco-IOS-XE-logging.yang:1113): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-logging"
Cisco-IOS-XE-native.yang:2741 (at Cisco-IOS-XE-logging.yang:1128): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-logging"
Cisco-IOS-XE-native.yang:2741 (at Cisco-IOS-XE-logging.yang:1161): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-logging"
Cisco-IOS-XE-native.yang:2741 (at Cisco-IOS-XE-logging.yang:1176): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-logging"
INFO: encountered (<pyang.error.Position object at 0x7f75f3a3a2d0>, 'XPATH_NODE_NOT_FOUND2', ('Cisco-IOS-XE-native', 'native', 'Cisco-IOS-XE-interfaces'))
FATAL: pyangbind cannot build module that pyang has found errors with.

Here is the command I used:

pyang --plugindir /usr/local/lib/python3.6/dist-packages/pyangbind/plugin/ -f pybind -o yang_models.py Cisco-IOS-XE-native.yang

This is the python and pyang version I use for my tests:

root@bf1477474958:/yang/vendor/cisco/xe/1751# pyang --version
pyang 2.4.0
root@bf1477474958:/yang/vendor/cisco/xe/1751# python3 --version
Python 3.6.9

Is there a fix or a workaround for that problem?

Thank you Remo

rgrueebler avatar May 29 '21 20:05 rgrueebler

I have the exact same issue!

denvle avatar Oct 27 '21 13:10 denvle

Hi,

Could you please try again with recent versions of pyangbind?

Thanks.

JoseIgnacioTamayo avatar Oct 13 '23 07:10 JoseIgnacioTamayo

Closing issue without recent updates.

JoseIgnacioTamayo avatar Feb 22 '24 07:02 JoseIgnacioTamayo