Get all MAC address and interfaces Aruba CX REST API
I will try here as well as GitHub, I would like to get all the MAC addresses and their ports/interfaces; and I'd like this to be fast :)
Does anyone know how to do it with pyaoscx library? Or even directly with the CX REST API?
Method right now means looping over all MAC addresses which is slow.
I suppose I could try to SSH in/use ansible to connect and run show mac-address-table but I'd like to learn and use an API :)
Posted May 4, 2022, 3:28 PM UTC
24
Is this what you're after?
https://developer.arubanetworks.com/aruba-aoscx/reference/get_system-vlans-id-macs
https://developer.arubanetworks.com/aruba-aoscx/reference/get_system-interfaces
Might be that first one is a way to get it all out.
It's a pretty nice reference page, with those examples
My next project when I have time is to extend MindnMap to work with the various Aruba platforms - John wrote it for Cisco because that's what he uses in his environment, but he designed it so that if you've got JSON from other platforms, you can do all kinds of neat things with it.
That's looking pretty sweet!
I use this data to help folks find out Mac addresses of various devices.