Package: aioruckus
aioruckusA Python API which interacts with Ruckus Unleashed and ZoneDirector devices via their AJAX Web Service interface.Configuration information can also be queried from Ruckus Unleashed and ZoneDirector backup files.Compatible with all Ruckus Unleashed versions, and Ruckus ZoneDirector versions 9.10 onwards.How to installpipinstallaioruckusUsageFunctions are defined within anasynccontext manager, so you will have to useasynciorather than calling the functions directly in a shell.fromaioruckusimportAjaxSession,BackupSession,SystemStatimportasyncioasyncdeftest_aioruckus():asyncwithAjaxSession.async_create("<ruckus ip>","<ruckus user>","<ruckus password>")assession:ruckus=session.api## viewing configuration# note: configuration functions resolve all related objects, so may be slower than stats functions#aps=awaitruckus.get_aps()ap_groups=awaitruckus.get_ap_groups()wlans=awaitruckus.get_wlans()wlan_groups=awaitruckus.get_wlan_groups()# WLAN Groups are CLI-only on Unleasheddpsks=awaitruckus.get_dpsks()mesh=awaitruckus.get_mesh_info()default_system_info=awaitruckus.get_system_info()all_system_info=awaitruckus.get_system_info(SystemStat.ALL)## working with with client devices#active_clients=awaitruckus.get_active_clients()inactive_clients=awaitruckus.get_inactive_clients()# always empty on Unleashedblocked_clients=awaitruckus.get_blocked_client_macs()#awaitruckus.do_block_client("60:ab:de:ad:be:ef")awaitruckus.do_unblock_client("60:ab:de:ad:be:ef")#new_rogues=awaitruckus.get_active_rogues()known_rogues=awaitruckus.get_known_rogues()blocked_rogues=awaitruckus.get_blocked_rogues()## working with APs#ap_stats=awaitruckus.get_ap_stats()ap_group_stats=awaitruckus.get_ap_group_stats()#awaitruckus.do_hide_ap_leds("24:79:de:ad:be:ef")awaitruckus.do_show_ap_leds("24:79:de:ad:be:ef")#awaitruckus.do_restart_ap("24:79:de:ad:be:ef")## working with WLANs / VAPs#vap_stats=awaitruckus.get_vap_stats()wlan_group_stats=awaitruckus.get_wlan_group_stats()#awaitruckus.do_disable_wlan("my ssid")awaitruckus.do_enable_wlan("my ssid")#awaitruckus.do_set_wlan_password("my ssid","blah>blah<")## viewing events / alarms / logs#all_alarms=awaitruckus.get_all_alarms(limit=15)#all_events=awaitruckus.get_all_events(limit=1000)ap_events=awaitruckus.get_ap_events()ap_group_events=awaitruckus.get_ap_events("24:79:de:ad:be:ef","24:59:de:ad:be:ef")wlan_events=awaitruckus.get_wlan_events()wlan_group_events=awaitruckus.get_wlan_events("my ssid","my other ssid","my third ssid")client_events=awaitruckus.get_client_events(limit=50)wired_client_events=awaitruckus.get_wired_client_events()#syslog=awaitruckus.get_syslog()## modifying configuration#awaitruckus.do_add_wlan_group("new empty wlangroup","empty group added by aioruckus")awaitruckus.do_add_wlan_group("new full wlangroup","group added by aioruckus",wlans)#wlan_group_template=next((wlangforwlanginwlan_groupsifwlang["name"]=="Default"),None)awaitruckus.do_clone_wlan_group(wlan_group_template,"Copy of Default")#awaitruckus.do_delete_wlan_group("Copy of Default")#awaitruckus.do_add_wlan("my new sid",passphrase="mypassphrase")awaitruckus.do_edit_wlan("my new sid",{"ofdm-rate-only":True})#template_wlan=next((wlanforwlaninwlansifwlan["name"]=="my ssid"),None)awaitruckus.do_clone_wlan(template_wlan,"my newer sid")awaitruckus.do_delete_wlan("my newer sid")# viewing backed-up configurationwithBackupSession.create("<ruckus backup filename>")assession:ruckus=session.apiaps=awaitruckus.get_aps()ap_groups=awaitruckus.get_ap_groups()wlans=awaitruckus.get_wlans()wlan_groups=awaitruckus.get_wlan_groups()dpsks=awaitruckus.get_dpsks()blocked=awaitruckus.get_blocked_client_macs()mesh=awaitruckus.get_mesh_info()all_system_info=awaitruckus.get_system_info(SystemStat.ALL)asyncio.run(test_aioruckus())Other APIs for Ruckus UnleashedThis project was originally a fork ofpyruckus, which provides similar Python query functionality by controlling an SSH CLI session.There is aGo clientfor the latest releases of Unleashed.Since it's strongly typed, has good quality comments, and doesn't (yet) contain the large collection of tweaks and hacks needed to work over a wide range of Unleashed and ZoneDirector releases, theruckus-gosource code is a great place to understand the required requests and responses you should expect to receive from the AJAX API.There is alsoscraplisupport for the Ruckus Unleashed SSH CLI viascrapli community.Authentication and privilege levels are implemented, but no templates are implemented as of August 2023.