wrote:
We have 1000 new APs and i do not want to unbox them all before installation, so my plan is to scan all mac adresses on the boxes to preconfigure them e.g. in an cli script or similar.
Does anybody have an idea how to deal with it?
Firstly there is no way to pre-provision campus APs unfortunately, so depending on your comfort with Linux/scripting/SNMP, I would solve this in two parts.
First, get your hands on Aruba's AP installer App in the play store (Android only I presume) and use it to scan the barcodes and mac addresses of your APs one by one. The app lets you tag various info into the record, such as the ap name and a field for 'notes' that you can store the desired AP group name in.
Click your way through the APs then email yourself the result. The result is a .csv file, which can be easily turned into CLI commands that can be cut and paste into the CLI once the APs are up.
Sample of the .csv
$ cat "AP Installer app log file_2018_0130_115039.csv"
recordId, recordName, recordMac, recordSerNum, notes, photoList size, floorView size, latitude, longitude, floorId, floorIndex, touchPointX, touchPointY, floor width, floor height, floor dimensions units, streetAddress
0,ap1-l2-zzz,6CF37FAA6FD8,AX0119921,building-1,0,0,0,0,not found,-1,0,0,0,0,,
1,ap2-l3-xxx,C8B44DCE940E,CNDHJ0T1J6,building-2,0,0,0,0,not found,-1,0,0,0,0,,
you can either store this as some sort of lookup database, or, you can slice it up into CLI commands with some shell/perl/python scripting, e.g. once you tokenise the csv, you just generate a bunch of CLI commands using some pseudo code like this, and then just paste it into the CLI
conf t
[for loop that loads $macaddr, $aproup and $newname] {
provision-ap read-bootinfo ap-name $macaddr
ap-group $apgroup
ap-name $newname
<other stuff>
reprovision ap-name $macaddr
!
}
Part 2: automation.... if you saved the AP installer output in some common location then you can go down the path of auto provisioning by (ab)using SNMP traps that the controller will send when the AP comes up. With some googling and glue scripts, you can get a linux based snmpd to bind the AP UP trap OID to a script which reads through the database for the AP mac address (after putting colons back in), finds the correct name and then talks to the controller using [language/curl/other] to reprovision the AP into the correct AP group.
I am not sure at what point part 2 becomes viable with your situation...
hth.