Sure ! Here it is import json from meraki import meraki apikey = "" #YOUR KEY orgid = "" #YOUR ORG ID Inventaire = meraki.getorginventory(apikey,orgid) for switch in Inventaire: if switch['networkId'] is not None: lldp = meraki.getlldplldp(apikey, switch['networkId'] , switch['serial']) try: for portID in lldp['ports']: try: if "AP" in lldp['ports'][portID]['lldp']['systemName']: #checking if AP is in the lldp info , we named our AP like that portdetail = meraki.getswitchportdetail(apikey, switch['serial'] , portID) if portdetail['type'] == "access": config = "Port {} de la switch {} est mal configuré pour la borne {}.\n".format(portID, switch['name'], lldp['ports'][portID]['lldp']['systemName'] ) f = open("OP_portAP.txt", "a") f.write(config) f.close() except: erreur = "no ports" except: erreur = "no lldp" You might want to adjust some parts in the script , but the logic is there,
... View more