I'm trying to create a new access policy with a Python script using the Meraki library. I'm 'getting' the model policy from a known good network switch, & trying to 'put' it on a few more network switches. access_policy = dashboard.switch.getNetworkSwitchAccessPolicies(network_id) ap_name = access_policy[0]["name"] radiusServers = access_policy[0]["radiusServers"] dict_radiusServers = radiusServers[0] pop_radiusServers = dict_radiusServers.pop('serverId') radiusServers = [dict_radiusServers] radiusTestingEnabled = access_policy[0]["radiusTestingEnabled"] radiusCoaSupportEnabled = access_policy[0]["radiusCoaSupportEnabled"] radiusAccountingEnabled = access_policy[0]["radiusAccountingEnabled"] hostMode = access_policy[0]["hostMode"] urlRedirectWalledGardenEnabled = access_policy[0]["urlRedirectWalledGardenEnabled"] radius = access_policy[0]["radius"] guestPortBouncing = access_policy[0]["guestPortBouncing"] radiusAccountingServers = access_policy[0]["radiusAccountingServers"] dict_radiusAccountingServers = radiusAccountingServers[0] pop_radiusAccountingServers = dict_radiusAccountingServers.pop('serverId') radiusAccountingServers = [dict_radiusAccountingServers] radiusGroupAttribute = access_policy[0]["radiusGroupAttribute"] accessPolicyType = access_policy[0]["accessPolicyType"] increaseAccessSpeed = access_policy[0]["increaseAccessSpeed"] guestVlanId = access_policy[0]["guestVlanId"] dot1x = access_policy[0]["dot1x"] voiceVlanClients = access_policy[0]["voiceVlanClients"] urlRedirectWalledGardenRanges = access_policy[0]["urlRedirectWalledGardenRanges"] response = dashboard.switch.createNetworkSwitchAccessPolicy(network_id, ap_name, radiusServers, radiusTestingEnabled, radiusCoaSupportEnabled, radiusAccountingEnabled, hostMode, urlRedirectWalledGardenEnabled, radius, guestPortBouncing, radiusAccountingServers, radiusGroupAttribute, accessPolicyType, increaseAccessSpeed, guestVlanId, dot1x, voiceVlanClients, urlRedirectWalledGardenRanges) Here's a printout of all those variables: L_599541700393704277 LHC-NAC-802.1X-Wired [{'organizationRadiusServerId': '3797660385780170753', 'host': '10.0.19.148', 'port': 1812}] True True True Multi-Domain True {'criticalAuth': {'dataVlanId': 100, 'voiceVlanId': 10, 'suspendPortBounce': False}, 'failedAuthVlanId': 100, 'reAuthenticationInterval': 86400} True [{'organizationRadiusServerId': '3797660385780170753', 'host': '10.0.19.148', 'port': 1813}] 11 Hybrid authentication True 100 {'controlDirection': 'both'} True ['10.0.0.0/8'] I'm getting an error message: response = dashboard.switch.createNetworkSwitchAccessPolicy(network_id, ap_name, radiusServers, radiusTestingEnabled, radiusCoaSupportEnabled, radiusAccountingEnabled, hostMode, urlRedirectWalledGardenEnabled, radius, ...<7 lines>... voiceVlanClients, urlRedirectWalledGardenRanges) TypeError: Switch.createNetworkSwitchAccessPolicy() takes 9 positional arguments but 19 were given I was able to create a policy using the Meraki Developer Hub Dashboard API, only after enabling the 'walledgarden' & adding a subnet. Any ideas on what I'm doing wrong?
... View more