Attached is the script to grab blacklisted clients from the Aruba controllers. (It also can set and remove them.)
Notes:
- It is a perl expect script so the expect sections dealing with the controllers may have to be altered to fit your controllers. Case counts so make sure things match or you won't get anywhere.
- The @hosts section will need to be changed to fit each environment as well as the if statements for each host. It was done this way for two reasons. 1.) it makes it easy to change the credentials used to log into each controller (even though that is not shown in the script). 2.) I was getting odd ouput at times if I tried to do this entire set of controllers in one loop. I "think" it has something to do with the way expect handles getting the output from a sent command ( expect-> before() )? But I'd love to know the real reason(?).
- The default running of the script will print out the blacklisted clients on all controllers. Every once in a while the output for a controller is not listed and I get "no paging" printed out instead. If you run it again it seems to print out correclty. I'm not sure if this is a timing issue or yet another case of the expect -> before() not working as I expect? I'd love to know the answer to this one too.
- The orginal file had a .pl file extension but the site would not allow me to upload it with that extension.
- Run it with a -h switch to get usage: aruba-blacklist.pl -h