cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
506
Views
0
Helpful
5
Replies
Highlighted
Beginner

CDP Neighbors using RESTConf - Some Devices Missing

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:image.pngimage.png

 

However, when I query the device over RESTConf using Postman, it only returns the 2 C9300s.

image.png

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

5 REPLIES 5
Highlighted
Beginner

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.

 

Highlighted

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.

Highlighted

Highlighted

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.

Highlighted

Go and have a look at the DevNet pages. The introductions are really good. And tooling is part of it.

I hope that you learn your solution over there.

Good luck and safe holidays.

B


Content for Community-Ad