Showing results for 
Search instead for 
Did you mean: 

Error in Cisco BGP YANG module

Hamed MT


I have recently started working on YANG model to use it in network automation (RESTCONF/NETCONF). Some parts are not clear for me and I would appreciate it if anyone can help me understand it.

  • My first question is about the modules validation. I try to validate the official YANG modules which are available on this repository ( with pyang. Lets say for Cisco-IOS-XE-bgp.yang under 1791. The pyang output shows many errors and warnings. Some of the errors are shown below. There are way more than this amount.


Cisco-IOS-XE-native.yang:2577 (at Cisco-IOS-XE-interfaces.yang:646): warning: node "Cisco-IOS-XE-native::native" is not found in module "Cisco-IOS-XE-interfaces"
Cisco-IOS-XE-interfaces.yang:3143: error: "Cisco-IOS-XE-interfaces:native" in the path for AppNav-UnCompress at Cisco-IOS-XE-bgp.yang:14144 (at Cisco-IOS-XE-interfaces.yang:3139) is not found
Cisco-IOS-XE-interfaces.yang:3156: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM at Cisco-IOS-XE-bgp.yang:14144 (at Cisco-IOS-XE-interfaces.yang:3154) is not found
Cisco-IOS-XE-interfaces.yang:3170: error: "Cisco-IOS-XE-interfaces:native" in the path for ATM-ACR at Cisco-IOS-XE-bgp.yang:14144 (at Cisco-IOS-XE-interfaces.yang:3168) is not found
Cisco-IOS-XE-interfaces.yang:3178: error: "Cisco-IOS-XE-interfaces:native" in the path for BDI at Cisco-IOS-XE-bgp.yang:14144 (at Cisco-IOS-XE-interfaces.yang:3174) is not found
Cisco-IOS-XE-interfaces.yang:3185: error: "Cisco-IOS-XE-interfaces:native" in the path for CEM at Cisco-IOS-XE-bgp.yang:14144 (at Cisco-IOS-XE-interfaces.yang:3181) is not found
Cisco-IOS-XE-interfaces.yang:3199: error: "Cisco-IOS-XE-interfaces:native" in the path for Embedded-Service-Engine at Cisco-IOS-XE-bgp.yang:14144 (at Cisco-IOS-XE-interfaces.yang:3195) is not found
Cisco-IOS-XE-interfaces.yang:3206: error: "Cisco-IOS-XE-interfaces:native" in the path for Ethernet at Cisco-IOS-XE-bgp.yang:14144 (at Cisco-IOS-XE-interfaces.yang:3202) is not found
Cisco-IOS-XE-interfaces.yang:3213: error: "Cisco-IOS-XE-interfaces:native" in the path for FastEthernet at Cisco-IOS-XE-bgp.yang:14144 (at Cisco-IOS-XE-interfaces.yang:3209) is not found
Cisco-IOS-XE-interfaces.yang:3220: error: "Cisco-IOS-XE-interfaces:native" in the path for GigabitEthernet at Cisco-IOS-XE-bgp.yang:14144 (at Cisco-IOS-XE-interfaces.yang:3216) is not found
Cisco-IOS-XE-interfaces.yang:3227: error: "Cisco-IOS-XE-interfaces:native" in the path for FiveGigabitEthernet at Cisco-IOS-XE-bgp.yang:14144 (at Cisco-IOS-XE-interfaces.yang:3223) is not found
Cisco-IOS-XE-interfaces.yang:3234: error: "Cisco-IOS-XE-interfaces:native" in the path for AppGigabitEthernet at Cisco-IOS-XE-bgp.yang:14144 (at Cisco-IOS-XE-interfaces.yang:3230) is not found

  • The second question is about different YANG modules. I have noticed that some YANG modules have a tree representation, while some others do not have. Is there any rule?
  • The third question is about how we can use this YANG module in network automation. Which modules should be used for configuring, lets say, an interface or BGP neighborship? There are vendor-based and standard-based modules. It is also much easier to define the changes in a YAML file then convert it to JSON/XML. How is it gonna be done? Is there any package for doing so? or it is up to up to write the proper script for translation and using/choosing the right module.


0 Replies 0
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers