Closed hyberdk closed 8 months ago
I don't know which version of these models are the most recent, but when I test with the models in YangModels/yang/vendor/cisco/xe/17121
it seems to work correctly.
In your example, there are warnings:
Cisco-IOS-XE-interfaces.yang:373 (at Cisco-IOS-XE-interfaces.yang:609): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-native"
So something is going on...
the models for for the IOS-XE 17.6.5 versions (downloaded from my router), I use these versions as they do not 100% match the official ones on yangmodels/yang/vendor/cisco/xe/1761
the warnings are some must statements that is not working. I think its a side effect from the "interface" container being place wrongly.
just to be safe I commented them out in this commit (I need to read up on the must syntax to fix them): hyberdk/yang_models_ios_xe@01e8a4647ba215ea856b42fe0aad7ae1a5ad1bb1
now it runs with out errors or warnings, but the "interface" container is still placed wrong.. from the looks of it, the 17.12.1 models that you tested are implementing the /native/interface container exactly the same way.. So it is really stange that it works there and not in my models..
(venv) eslau@N503476:~/repos-wsl/yang_models_ios-xe/ios-xe_17.6.5$ pyang -f flatten Cisco-IOS-XE-native.yang |more
xpath
/Cisco-IOS-XE-interfaces:interface
/Cisco-IOS-XE-interfaces:interface/ATM
/Cisco-IOS-XE-interfaces:interface/ATM/access-session
/Cisco-IOS-XE-interfaces:interface/ATM/access-session/closed
/Cisco-IOS-XE-interfaces:interface/ATM/access-session/control-direction
/Cisco-IOS-XE-interfaces:interface/ATM/access-session/control-direction/in
/Cisco-IOS-XE-interfaces:interface/ATM/access-session/control-direction-config
/Cisco-IOS-XE-interfaces:interface/ATM/access-session/host-mode
/Cisco-IOS-XE-interfaces:interface/ATM/access-session/inherit
/Cisco-IOS-XE-interfaces:interface/ATM/access-session/inherit/disable
/Cisco-IOS-XE-interfaces:interface/ATM/access-session/inherit/disable/autoconf
I guess it could be that its not a pyang issue, but can you see whats going on here? Its really weird..
Esben
nevermind, found the problem.. it was a leftover from some of my testing that sneaked into git
it works just fine.. thanks again for your help!
Esben
Hi @mbj4668,
Sorry about yet another issue I would like your comment on..
When I parse the Cisco-IOS-XE-native.yang module, I would expect that the containers would be
/ios:native/ios:interface/ios:AppNav-Compress etc.
The only root container in the model is /native (https://github.com/hyberdk/yang_models_ios_xe/blob/2d9e4fe5d7324fd964a5d1a0e60c99fddde7cb01/ios-xe_17.6.5/Cisco-IOS-XE-native.yang#L320) This model is yang v1.1 ;-)
however its showing /ios:/interface/* in the root also..
The Cisco-IOS-XE-interfaces.yang submodule implements the /ios:native/ios:interface/* tree here: https://github.com/hyberdk/yang_models_ios_xe/blob/2d9e4fe5d7324fd964a5d1a0e60c99fddde7cb01/ios-xe_17.6.5/Cisco-IOS-XE-native.yang#L2532C36-L2532C36
Im not sure its related to the latest commits as the problem both exist in v2.5.3 and v2.6.0
could there be another bug here?
here is my output from pyang:
if I look at the children in the code, it does infact look like its seing two i_children.
but looking at the substmts, it looks like its parsing the native module just fine..
Am I missing something?
Esben