12-17-2020 05:39 AM - edited 12-18-2020 03:31 AM
Hi all,
I'm using RESTConf to query our Catalyst 9300s, but when it comes to CDP Neighbors I am coming unstuck. I have a switch which I know has 3 Access Points and 2 9300s as neighbors, and when I view the switch's WebUI or command line, it shows all 5 devices:
However, when I query the device over RESTConf using Postman, it only returns the 2 C9300s.
The query I am using is:
https://x.x.x.x/restconf/data/Cisco-IOS-XE-cdp-oper:cdp-neighbor-details/cdp-neighbor-detail?fields=device-name;local-intf-name;port-id;platform-name
How can I return all neighbors using RESTConf - Can anyone tell me where my issue lies?
Thank you
12-17-2020 11:25 PM
Can you run a search on one level higher? perhaps the data is inside another Yang container?
I see that it are 3 devices cisco-air missing. Looks like it is kept in another container. Maybe look at that possibility? In Git-Hub you will find all cisco Yang models. Inside the models search on LLDP. Maybe there is more then the container you are calling in the restconf.
12-18-2020 03:29 AM
If I change the query to:
https://x.x.x.x/restconf/data/Cisco-IOS-XE-cdp-oper:cdp-neighbor-details
I get the same number of entities (I'm just displaying device-name and platform-name sub-properties here), but just displayed within the cdp-neighbor-details container. That is I believe the top level, and there is no other data returned.
12-18-2020 06:39 AM
12-22-2020 05:47 AM
I have to say I don't know the equivalent NETCONF command, I'm quite new to using RESTconf. I don't have a tool for running NETCONF commands.
12-23-2020 01:04 AM
03-30-2021 03:57 PM - edited 04-15-2021 08:24 AM
Hi, did you ever resolve the issue? I just encountered this on my 9300s as well. It seems like the RESTCONF endpoint only returns switch cdp info and drops the AP info.
EDIT: I found bug ID CSCvt13997 in Cisco's Bug Tracker, and I was about to open a TAC case when I decided to test against a newer version of software. I was previously testing using 16.12.02 and encountered this issue, but it appears to be fixed in 16.12.04, FYI!
EDIT (4/15/21): I ended up opening a TAC case and we determined the issue only impacts C3700 series APs. My 9100 and 1800 series access points both show up in the CDP neighbors restconf ouptut (tested on over 60 switches running 16.12.04). According to TAC, developers are working to fix the issue and will commit it in one of the next releases (but there isn't a timeline to doing so).
For now, if you have access to the bug search tool, you can subscribe to notifications to get daily/weekly email updates:
https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvt13997
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