Hi All,
I'm getting the error in the subject when I try to cycle switch port. i can apply or remove the access policy using the same for loop with no issues. But when I try to cycle I'm getting the error. below is my code.
any idea please?
Solved! Go to Solution.
Hi ,
If you look at the documentation the input must be an array : https://developer.cisco.com/meraki/api-v1/#!cycle-device-switch-ports
like : ports = ['1', '2-5'] or simply ports = ['1'] while you are probably passing a string from getDeviceSwitchPorts ( portId = "1" )
There are many ways to fix it.
portlist = []
portlist.append(port['portId'])
port_Cycle = dashboard.switch.cycleDeviceSwitchPorts(device['serial'], portlist)
Hi ,
If you look at the documentation the input must be an array : https://developer.cisco.com/meraki/api-v1/#!cycle-device-switch-ports
like : ports = ['1', '2-5'] or simply ports = ['1'] while you are probably passing a string from getDeviceSwitchPorts ( portId = "1" )
There are many ways to fix it.
portlist = []
portlist.append(port['portId'])
port_Cycle = dashboard.switch.cycleDeviceSwitchPorts(device['serial'], portlist)
Thank you, that worked!
Excellent ! Glad we were able to help you !
Have a good one