Closed yakubcze closed 4 weeks ago
Hi
See https://github.com/robshakir/pyangbind/issues/352#issuecomment-2231748730.
If you run pyangbind this way, what error/warning does it show?
''' pyang -V --plugindir $PYBINDPLUGIN \ -p ../yang/cisco/vendor/cisco/xe/1693/ \ -f tree --strict \ ../yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-native.yang '''
Thanks for your reply!
If i run the command you have provided, i get the same warnings, however the tree is outputted. Since the tree is huge, i have redirected it to a text file, which is included here.
(venv) jakub@Jakub-T480s:~/pyangbind_issue$ pyang -V --plugindir $PYBINDPLUGIN -p ./yang/cisco/vendor/cisco/xe/1693/ -f tree ./yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-native.yang > native_tree.txt
# module search path: ./yang/cisco/vendor/cisco/xe/1693/:.:/home/jakub/pyangbind_issue/venv/share/yang/modules
# read ./yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-native.yang (CL)
# read yang/cisco/vendor/cisco/xe/1693/ietf-inet-types.yang
# read /home/jakub/pyangbind_issue/venv/share/yang/modules/ietf/ietf-inet-types.yang
# read yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-types.yang
# read yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-features.yang
# read yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-interface-common.yang
# read yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-parser.yang
# READ yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-native.yang
# read yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-license.yang
# read yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-line.yang
# read yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-logging.yang
# read yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-ip.yang
# read yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-ipv6.yang
# read yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-interfaces.yang
./yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-native.yang:2055 (at yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-interfaces.yang:1017): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-interfaces"
./yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-native.yang:2055 (at yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-interfaces.yang:1021): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-interfaces"
./yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-native.yang:2055 (at yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-interfaces.yang:1033): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-interfaces"
./yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-native.yang:2055 (at yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-interfaces.yang:1348): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-interfaces"
./yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-native.yang:2055 (at yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-interfaces.yang:2922): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-interfaces"
./yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-native.yang:2055 (at yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-interfaces.yang:3008): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-interfaces"
./yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-native.yang:1947 (at yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-ip.yang:226): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
./yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-native.yang:1947 (at yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-ip.yang:1990): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
./yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-native.yang:1947 (at yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-ip.yang:2053): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
./yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-native.yang:1982 (at yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-ipv6.yang:330): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ipv6"
./yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-native.yang:1982 (at yang/cisco/vendor/cisco/xe/1693/Cisco-IOS-XE-ipv6.yang:352): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ipv6"
If my understanding is correct, based on https://github.com/robshakir/pyangbind/issues/352#issuecomment-2231748730, the issue seems to be caused by incorrect module provided by Cisco. If so, what can be done to fix it? I'm sorry for asking such a stupid question, but any clue on how to tackle this would be of great help to me.
Thanks again!
I took some newer models from https://github.com/YangModels/yang/tree/main/vendor/cisco/xe and, for example, 17151 does not throw any pyang warning when building the tree.
Maybe using a newer model helps.
Oh, so it really was problem with the model itself. Well now i have to check if my older devices support these newer models, but i guess there is nothing else that can be done about it.
Thank you for your time and for this tip. I am closing this issue at this point, as it seems pyangbind is working fine.
The issue in #276 is still present, are there any updates to this?
Any help would be greatly appriciated!
Thanks in advance!