Higher Education

last person joined: 9 days ago 

Got questions on how to enable mobility in education? Submit them here!
Expand all | Collapse all

Mass deletion

This thread has been viewed 2 times
  • 1.  Mass deletion

    Posted Apr 23, 2014 10:54 AM

    Hello, 

    We are starting a project to replace about 1500 AP 125. I really do not want to delete one at the time via GUI.

    Is there a way to delete AP from the CLI (SQL) using S/N or MAC address?

     

     

    Thank you.

     



  • 2.  RE: Mass deletion

    Posted Apr 23, 2014 10:58 AM

     

    Notepad ++ will take you there.

     

    Do a show ap database long that will provide you the list of mac addressess or names and then replace it with clear gab-db wired mac or ap-name 



  • 3.  RE: Mass deletion

    EMPLOYEE
    Posted Apr 23, 2014 11:00 AM

    You can also dump it to a CSV and then use the concat function in excel to build a list of commands that you can paste into the CLI.



  • 4.  RE: Mass deletion

    Posted Apr 23, 2014 11:02 AM

    Excellent idea!



  • 5.  RE: Mass deletion

    Posted Apr 23, 2014 11:03 AM

    Thank you

    Sorry I should has added to remove from Airwave not the controls!!!

     

     



  • 6.  RE: Mass deletion

    Posted Apr 23, 2014 11:08 AM

    Here you go.

    I built the excel sheet for you.

    Column A = MAC address of AP
    Column B = command with ap-name being the MAC address
    If you want to use the actualy AP-name, replace column A with the APs name.
    Column C = command with the wired-mac of the AP

     

    EDIT: I can't seem to attach it. i'll PM you the file

    EDIT2: I can't even attacha file in a PM...case of the mondays

     

    Here is how it is done in excel

    Capture.JPG



  • 7.  RE: Mass deletion

    Posted Apr 23, 2014 11:11 AM

    For controllers:

     

    Do the following in terminal:

    no paging
    show ap database long | include "125 "

     That'll give you all the AP-125s. The copy/paste that into a text file.

    In your UNIX terminal (MacOS, etc.), run the following command:

     

    grep "125 " filename | awk '{print "clear gap-db wired-mac "$9}'

     That'll output all the commands for you to just quickly copy/paste into your terminal.

     

    In Airwave:

     

    Just deploy your replacement APs, and so long as they have the same ap-name, you can just click "Replace Hardware" on the Authorize page. Airwave automatically will match the old (125s) with the new. It's just a couple of clicks at that point. This method allows you to retain historical information. If you were to simply purge out of the postgres database, you'd lose all that good information. :-)

     



  • 8.  RE: Mass deletion

    Posted Apr 23, 2014 01:44 PM

    Thank you all for the great infomations.

     

    The installers will be scanning old APs so we will have S/N and MAC for each old AP

    We are not sure if we are going to keep the same name schem, so the "ap Replacement" will not work.

    Also one reason for removall is licenses count, both AirWave and AoS

     

    I got this info from Support, 

     

    Using MAC address, # dbc "Delete from ap where lan_mac = '00:1A:1E:CB:16:8C';"

    Using Serial number # dbc "Delete from ap where device_serial = ‘A0005690';”

    So a bit of "awk, bash, while", I think I got what we need.

     

    Thank you again.