Bulk AP Naming from CSV or other source

The_Roo
Getting noticed

Bulk AP Naming from CSV or other source

I have a bunch of sites that I have configured manually, which is OK up to about 100 APs then the time and effort to configure each AP gets a bit excessive. I now have to build a site with 350 APs and I don't want to use my time doing that many APs manually.

Is there a way to use a CSV file or similar,to input things like AP name, address, tags, etc, etc.

Thanks

Roo

2 Replies 2
Ryan_Miles
Meraki Employee
Meraki Employee

Perhaps give this option a look https://netprepare.com/blog/automate-meraki-device-renaming/

Ryan / Meraki SE

If you found this post helpful, please give it kudos. If my answer solved your problem, click "Accept as Solution" so that others can benefit from it.
rhbirkelund
Kind of a big deal

With a file named "name.csv", that contains the following,

name,serial
ap1,xxx
ap2,yyy
ap3,zzz

You can use the following

#! /usr/bin/env python3

import meraki
import csv

def main():
    dashboard = meraki.DashboardAPI(suppress_logging=True)

    with open("name.csv") as csvfile:
        ap = csv.DictReader(csvfile, delimiter=',')
        for row in ap:
            # print(row['name'],row['serial'])
            print("Updating:",row['serial'])
            response = dashboard.devices.updateDevice(
                row['serial'], 
                name=row['name'], 
            )
            if response['name'] is row['name']:
                print("Success!")

if __name__ == "__main__":
    main()
LinkedIn ::: https://blog.rhbirkelund.dk/

Like what you see? - Give a Kudo ## Did it answer your question? - Mark it as a Solution 🙂

All code examples are provided as is. Responsibility for Code execution lies solely your own.
Get notified when there are additional replies to this discussion.