YangModels / yang

YANG modules from standards organizations such as the IETF, The IEEE, The Metro Ethernet Forum, open source such as Open Daylight or vendor specific modules
1.52k stars 1.2k forks source link

pyang errors on Cisco XE models. #1429

Closed hyberdk closed 1 year ago

hyberdk commented 1 year ago

Hi all,

Im trying to validate the models in vendor/cisco/xe/17xxx as I would like to build python packages for ydk-gen..

When I use pyang to validate the models, they fail and I cannot figure out what is wrong (im no expert in the area)..

here is an example for "errors" that looks like is related to "Cisco-IOS-XE-interfaces.yang"

repo steps:

  1. clone repo
  2. pip install pyang==2.5.3
  3. cd vendor/cisco/xe/1761
  4. pyang --verbose Cisco-IOS-XE-bgp.yang

here is my output:

(venv) eslau@N503476:~/repos-wsl/ydk_poc/yang/vendor/cisco/xe/1761$ pyang --verbose Cisco-IOS-XE-bgp.yang
# module search path: .:/home/eslau/repos-wsl/ydk_poc/venv/share/yang/modules
# read Cisco-IOS-XE-bgp.yang (CL)
# read cisco-semver.yang
# read ietf-inet-types.yang
# read Cisco-IOS-XE-types.yang
# read Cisco-IOS-XE-features.yang
# read Cisco-IOS-XE-interface-common.yang
# read Cisco-IOS-XE-isis.yang
# read Cisco-IOS-XE-snmp.yang
# read Cisco-IOS-XE-native.yang
# read Cisco-IOS-XE-parser.yang
# read Cisco-IOS-XE-license.yang
# read Cisco-IOS-XE-line.yang
# read Cisco-IOS-XE-logging.yang
# read Cisco-IOS-XE-ip.yang
# read Cisco-IOS-XE-interfaces.yang
# read Cisco-IOS-XE-ipv6.yang
# read Cisco-IOS-XE-ospfv3.yang
Cisco-IOS-XE-native.yang:2489 (at Cisco-IOS-XE-interfaces.yang:601): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-interfaces"
Cisco-IOS-XE-native.yang:2489 (at Cisco-IOS-XE-interfaces.yang:1577): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-interfaces"
Cisco-IOS-XE-native.yang:2489 (at Cisco-IOS-XE-interfaces.yang:1580): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-interfaces"
Cisco-IOS-XE-native.yang:2489 (at Cisco-IOS-XE-interfaces.yang:1592): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-interfaces"
Cisco-IOS-XE-native.yang:2489 (at Cisco-IOS-XE-interfaces.yang:1739): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-interfaces"
Cisco-IOS-XE-native.yang:2489 (at Cisco-IOS-XE-interfaces.yang:1742): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-interfaces"
Cisco-IOS-XE-native.yang:2489 (at Cisco-IOS-XE-interfaces.yang:1916): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-interfaces"
Cisco-IOS-XE-native.yang:2489 (at Cisco-IOS-XE-interfaces.yang:2238): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-interfaces"
Cisco-IOS-XE-interfaces.yang:3216: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-Compress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3212) is not found
Cisco-IOS-XE-interfaces.yang:3216: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-Compress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3212) is not found
Cisco-IOS-XE-interfaces.yang:3216: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-Compress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3212) is not found
Cisco-IOS-XE-interfaces.yang:3216: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-Compress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3212) is not found
Cisco-IOS-XE-interfaces.yang:3216: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-Compress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3212) is not found
Cisco-IOS-XE-interfaces.yang:3216: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-Compress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3212) is not found
Cisco-IOS-XE-interfaces.yang:3216: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-Compress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3212) is not found
Cisco-IOS-XE-interfaces.yang:3216: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-Compress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3212) is not found
Cisco-IOS-XE-interfaces.yang:3216: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-Compress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3212) is not found
Cisco-IOS-XE-interfaces.yang:3216: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-Compress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3212) is not found
Cisco-IOS-XE-interfaces.yang:3216: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-Compress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3212) is not found
Cisco-IOS-XE-interfaces.yang:3216: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-Compress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3212) is not found
Cisco-IOS-XE-interfaces.yang:3216: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-Compress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3212) is not found
Cisco-IOS-XE-interfaces.yang:3216: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-Compress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3212) is not found
Cisco-IOS-XE-interfaces.yang:3216: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-Compress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3212) is not found
Cisco-IOS-XE-interfaces.yang:3216: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-Compress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3212) is not found
Cisco-IOS-XE-interfaces.yang:3216: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-Compress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3212) is not found
Cisco-IOS-XE-interfaces.yang:3223: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-UnCompress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3219) is not found
Cisco-IOS-XE-interfaces.yang:3223: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-UnCompress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3219) is not found
Cisco-IOS-XE-interfaces.yang:3223: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-UnCompress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3219) is not found
Cisco-IOS-XE-interfaces.yang:3223: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-UnCompress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3219) is not found
Cisco-IOS-XE-interfaces.yang:3223: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-UnCompress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3219) is not found
Cisco-IOS-XE-interfaces.yang:3223: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-UnCompress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3219) is not found
Cisco-IOS-XE-interfaces.yang:3223: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-UnCompress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3219) is not found
Cisco-IOS-XE-interfaces.yang:3223: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-UnCompress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3219) is not found
Cisco-IOS-XE-interfaces.yang:3223: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-UnCompress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3219) is not found
Cisco-IOS-XE-interfaces.yang:3223: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-UnCompress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3219) is not found
Cisco-IOS-XE-interfaces.yang:3223: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-UnCompress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3219) is not found
Cisco-IOS-XE-interfaces.yang:3223: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-UnCompress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3219) is not found
Cisco-IOS-XE-interfaces.yang:3223: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-UnCompress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3219) is not found
Cisco-IOS-XE-interfaces.yang:3223: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-UnCompress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3219) is not found
Cisco-IOS-XE-interfaces.yang:3223: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-UnCompress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3219) is not found
Cisco-IOS-XE-interfaces.yang:3223: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-UnCompress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3219) is not found
Cisco-IOS-XE-interfaces.yang:3223: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-UnCompress at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3219) is not found
Cisco-IOS-XE-interfaces.yang:3230: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3226) is not found
Cisco-IOS-XE-interfaces.yang:3230: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3226) is not found
Cisco-IOS-XE-interfaces.yang:3230: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3226) is not found
Cisco-IOS-XE-interfaces.yang:3230: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3226) is not found
Cisco-IOS-XE-interfaces.yang:3230: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3226) is not found
Cisco-IOS-XE-interfaces.yang:3230: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3226) is not found
Cisco-IOS-XE-interfaces.yang:3230: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3226) is not found
Cisco-IOS-XE-interfaces.yang:3230: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3226) is not found
Cisco-IOS-XE-interfaces.yang:3230: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3226) is not found
Cisco-IOS-XE-interfaces.yang:3230: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3226) is not found
Cisco-IOS-XE-interfaces.yang:3230: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3226) is not found
Cisco-IOS-XE-interfaces.yang:3230: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3226) is not found
Cisco-IOS-XE-interfaces.yang:3230: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3226) is not found
Cisco-IOS-XE-interfaces.yang:3230: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3226) is not found
Cisco-IOS-XE-interfaces.yang:3230: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3226) is not found
Cisco-IOS-XE-interfaces.yang:3230: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3226) is not found
Cisco-IOS-XE-interfaces.yang:3230: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3226) is not found
Cisco-IOS-XE-interfaces.yang:3236: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3234) is not found
Cisco-IOS-XE-interfaces.yang:3236: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3234) is not found
Cisco-IOS-XE-interfaces.yang:3236: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3234) is not found
Cisco-IOS-XE-interfaces.yang:3236: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3234) is not found
Cisco-IOS-XE-interfaces.yang:3236: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3234) is not found
Cisco-IOS-XE-interfaces.yang:3236: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3234) is not found
Cisco-IOS-XE-interfaces.yang:3236: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3234) is not found
Cisco-IOS-XE-interfaces.yang:3236: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3234) is not found
Cisco-IOS-XE-interfaces.yang:3236: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3234) is not found
Cisco-IOS-XE-interfaces.yang:3236: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3234) is not found
Cisco-IOS-XE-interfaces.yang:3236: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3234) is not found
Cisco-IOS-XE-interfaces.yang:3236: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3234) is not found
Cisco-IOS-XE-interfaces.yang:3236: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3234) is not found
Cisco-IOS-XE-interfaces.yang:3236: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3234) is not found
Cisco-IOS-XE-interfaces.yang:3236: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3234) is not found
Cisco-IOS-XE-interfaces.yang:3236: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3234) is not found
Cisco-IOS-XE-interfaces.yang:3236: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3234) is not found
Cisco-IOS-XE-interfaces.yang:3244: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM-ACR at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3240) is not found
Cisco-IOS-XE-interfaces.yang:3244: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM-ACR at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3240) is not found
Cisco-IOS-XE-interfaces.yang:3244: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM-ACR at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3240) is not found
Cisco-IOS-XE-interfaces.yang:3244: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM-ACR at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3240) is not found
Cisco-IOS-XE-interfaces.yang:3244: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM-ACR at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3240) is not found
Cisco-IOS-XE-interfaces.yang:3244: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM-ACR at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3240) is not found
Cisco-IOS-XE-interfaces.yang:3244: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM-ACR at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3240) is not found
Cisco-IOS-XE-interfaces.yang:3244: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM-ACR at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3240) is not found
Cisco-IOS-XE-interfaces.yang:3244: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM-ACR at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3240) is not found
Cisco-IOS-XE-interfaces.yang:3244: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM-ACR at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3240) is not found
Cisco-IOS-XE-interfaces.yang:3244: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM-ACR at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3240) is not found
Cisco-IOS-XE-interfaces.yang:3244: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM-ACR at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3240) is not found
Cisco-IOS-XE-interfaces.yang:3244: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM-ACR at Cisco-IOS-XE-bgp.yang:12148 (at Cisco-IOS-XE-interfaces.yang:3240) is not found
Cisco-IOS-XE-interfaces.yang:3244: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM-ACR at Cisco-IOS-XE-bgp.yang:12148 

<snip>

Cisco-IOS-XE-native.yang:2440 (at Cisco-IOS-XE-ip.yang:1796): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2440 (at Cisco-IOS-XE-ip.yang:1799): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2440 (at Cisco-IOS-XE-ip.yang:1802): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2440 (at Cisco-IOS-XE-ip.yang:1805): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2440 (at Cisco-IOS-XE-ip.yang:1808): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2440 (at Cisco-IOS-XE-ip.yang:1811): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2440 (at Cisco-IOS-XE-ip.yang:1814): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2440 (at Cisco-IOS-XE-ip.yang:1817): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2440 (at Cisco-IOS-XE-ip.yang:1820): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2440 (at Cisco-IOS-XE-ip.yang:1823): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2440 (at Cisco-IOS-XE-ip.yang:1826): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2440 (at Cisco-IOS-XE-ip.yang:1829): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2440 (at Cisco-IOS-XE-ip.yang:1832): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2440 (at Cisco-IOS-XE-ip.yang:1835): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2440 (at Cisco-IOS-XE-ip.yang:1838): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2440 (at Cisco-IOS-XE-ip.yang:3144): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2440 (at Cisco-IOS-XE-ip.yang:3200): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2440 (at Cisco-IOS-XE-ip.yang:3702): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ip"
Cisco-IOS-XE-native.yang:2462 (at Cisco-IOS-XE-ipv6.yang:447): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ipv6"
Cisco-IOS-XE-native.yang:2462 (at Cisco-IOS-XE-ipv6.yang:471): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-ipv6"
Cisco-IOS-XE-native.yang:2759 (at Cisco-IOS-XE-logging.yang:230): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-logging"
Cisco-IOS-XE-native.yang:2759 (at Cisco-IOS-XE-logging.yang:239): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-logging"
Cisco-IOS-XE-native.yang:2759 (at Cisco-IOS-XE-logging.yang:668): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-logging"
Cisco-IOS-XE-native.yang:2759 (at Cisco-IOS-XE-logging.yang:723): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-logging"
Cisco-IOS-XE-native.yang:2759 (at Cisco-IOS-XE-logging.yang:855): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-logging"
Cisco-IOS-XE-native.yang:2759 (at Cisco-IOS-XE-logging.yang:917): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-logging"
Cisco-IOS-XE-native.yang:2759 (at Cisco-IOS-XE-logging.yang:1115): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-logging"
Cisco-IOS-XE-native.yang:2759 (at Cisco-IOS-XE-logging.yang:1130): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-logging"
Cisco-IOS-XE-native.yang:2759 (at Cisco-IOS-XE-logging.yang:1163): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-logging"
Cisco-IOS-XE-native.yang:2759 (at Cisco-IOS-XE-logging.yang:1178): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-logging"

Im using the latest pyang code, but it does not make a difference

Package      Version Editable project location
------------ ------- -----------------------------------
bcrypt       4.0.1
cffi         1.15.1
cryptography 41.0.1
lxml         4.9.2
ncclient     0.6.13
paramiko     3.2.0
pip          22.0.2
pyang        2.5.3   /home/eslau/repos-wsl/ydk_poc/pyang
pybind11     2.6.2
pycparser    2.21
PyNaCl       1.5.0
setuptools   59.6.0
six          1.16.0
wheel        0.40.0
ydk          0.8.6.2

Any suggestions to what I can do would be really appreciated!

Esben

jeremycohoe commented 1 year ago

Hi Essen, Simone reached to me regarding your usecase. BGP.YANG imports the Native.YANG per https://github.com/YangModels/yang/blob/main/vendor/cisco/xe/1761/Cisco-IOS-XE-bgp.yang#L26 so recommend to "validate" against the top most model with command like "pyang Cisco-IOS-XE-native.yang" if you really need to. Please work with your vendors TAC as this repo is not monitored.

hyberdk commented 1 year ago

Hi @jeremycohoe,

thanks for your reply, Im trying to active TAC via one of my technical account guys :-)

Anyways, from my basic understanding Im not sure I follow your logic..

Includes are used to import submodules (to split a large yang-model into different files), in that case it does not make sense to validate the submodule, as it cannot exist without the "parent" module.

Imports on the other hand is to import functionality of an external "root" module to extend your model. The BGP model also uses ietf-inet-types (see this) as in import, but testing this does not really test the BGP model. For me its the same with the Cisco native model, sure BGP uses it, but testing the native does not ensure that BGP is valid. There is no reference in the Cisco-IOS-XE-native model to the Cisco-IOS-XE-bgp..

However that being said.. I think the problem actually exist in the native model and that propagate all the way back to the BGP model (if that makes sense)

but thanks for your feedback, any is welcome :-)

Esben

einarnn commented 1 year ago

@hyberdk, I'm afraid that there is a longstanding issue with pyang not quite understanding the rules of YANG. If you drill down on the first error:

Cisco-IOS-XE-native.yang:2489 (at Cisco-IOS-XE-interfaces.yang:601): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-interfaces"

...then you can see that the node being complained about, Cisco-IOS-XE-native::native is for sure made available to the submodule's namespace using the belongs-to statement. You might find alternate results with yanglint, not sure. On Ubuntu you can install yanglint using apt install yang-tools. yanglint is sometimes maintained slightly better in some areas, but no promises!

Cheers,

Einar

einarnn commented 1 year ago

BTW, @jeremycohoe is right to say that this repo is not routinely monitored by vendors. We (the vendors) provide this repo as a convenience to developers to try and make all YANG models published across industry available in one place and, yes, if you have issues with a specific vendor's models, then I'm afraid you are best to follow up with the vendor as Jeremy suggested.

Cheers,

Einar

einarnn commented 1 year ago

Not an issue that will be resolved here, sorry! Closing for now.

hyberdk commented 1 year ago

Hi Einar,

thanks for the feedback..

Yeah, pyang seems to have different issues, im also trying yanglint, but its also proving to give errors..

(venv) eslau@N503476:~/repos-wsl/yang/vendor/cisco/xe/1761$ yanglint Cisco-IOS-XE-bgp.yang
libyang err : When condition cyclic dependency on the node "traps". (Schema location "/Cisco-IOS-XE-native:native/snmp-server/Cisco-IOS-XE-snmp:enable/enable-choice/traps/Cisco-IOS-XE-ospfv3:ospfv3-config/errors/enable".)
YANGLINT[E]: Parsing schema module "Cisco-IOS-XE-bgp.yang" failed.

the native model is also acting up..

As background (if other finds this topic), the reason I actually started with pyang was that that is what Cisco is using in their Yang Suite, but I found that YDK-GEN actually seems to be using yanglint. Bottom line is that I cannot validate the model and therefore I cannot convert it into python libs using YDK.

Anyways, thanks to both for your help.. Im now trying to drive the topic using my local Cisco SE

Esben

hyberdk commented 1 year ago

just an update, if someone finds this.. have a look at mbj4668/pyang#729