06-05-2024 12:26 PM
I'm struggling trying to find the right xml payload to get live data from cisco ncs540 and 5500 7.6.2 software. I able to find xml playload to make any configurations changes which is easy enough because i can export the whole config to a xml file and grab what I need there. HOWEVER if I want to execute like cli commands like show ip route vrf vrfname, or show controllers HundredGigE0/0/0/xx, or anything to get live data it's been a pain.
I downloaded the yang modules from https://github.com/YangModels/yang.git. then from here I was able to convert from yang to xml.
pyang -f sample-xml-skeleton openconfig-network-instance-l3.yang -o openconfig-network-instance-l3.xml
I tried to come up with the tight xml template/payload, but it's very difficult. Is there a command I can execute in the actual cisco router to give me exactly which yang module I should go to get the same data. Looking thru 986 yang module is very time consuming. There has to be a better way of doing this. Any advice??
Solved! Go to Solution.
06-05-2024 02:04 PM
I figure it out. Cisco YANG Suite
06-05-2024 02:04 PM
I figure it out. Cisco YANG Suite
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide