canerdianeh / aruba-campus

Scripts for Aruba Controllers
GNU General Public License v3.0
5 stars 1 forks source link

compatible with 8.10.0.7 ? #1

Open forsytad opened 1 year ago

forsytad commented 1 year ago

Does anyone know if this code is compatible with 8.10.0.7 ? I ran apbsstable.py successfully about a year ago, and just tried running it again and get an error. The main think I can think of that might have changed is that I think we might not have upgraded to 8.10 yet at that point. I'm running iy like this: python3 ./apbsstable.py --target --target

It lists the first controller and after running for a while fail saying:

Traceback (most recent call last): File "/root/luther/scripts/aruba-campus-main/./apbsstable.py", line 307, in if '-' in bss['phy']: KeyError: 'phy'

I just end up with a file that has only headers and no data in the output directory:

bss,ess,port,ip,band/ht-mode/bandwidth,Band,PHY,Channel,EIRP,Max-EIRP,ch/EIRP/max-EIRP,type,cur-cl,ap name,in-t(s),Uptime_Seconds,tot-t,mtu,acl-state,acl,fm,flags,cluster,active-clients,standby-clients,datazone,Controller_IP,Controller_Name,802.11k,802.11w,WPA3,OWE Transition OWE BSS,OWE Transition open BSS,WPA3-SAE mixed mode,Imminent VAP Down,VLAN Discovered

forsytad commented 1 year ago

I don't have quite enough python skill to fully debug this, but if I comment out lines 307-318, then it completes without error:

                #if '-' in bss['phy']:
                #   physplit=bss['phy'].split('-')
                #   bss['Band']=physplit[0]
                #   bss['PHY']=physplit[1]

                #if 'N/A' not in bss['ch/EIRP/max-EIRP']:
                #
                #   chansplit=bss['ch/EIRP/max-EIRP'].split('/')
                #   bss['Channel']=chansplit[0]
                #   bss['EIRP']=chansplit[1]
                #   bss['Max-EIRP']=chansplit[2]
                # Bust apart the flags into their own fields