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()
... View more