Hi i've got a problem.
I would like to update a config on a port of one of my switch with API (python) and i've always got a : HTTP response not OK.
from meraki import meraki
from meraki_sdk.meraki_sdk_client import MerakiSdkClient
from meraki_sdk.models.update_device_switch_port_model import UpdateDeviceSwitchPortModel
from meraki_sdk.models.udld_enum import UdldEnum
from meraki_sdk.exceptions.api_exception import APIException
x_cisco_meraki_api_key = 'MY_API_KEU'
client = MerakiSdkClient(x_cisco_meraki_api_key)
switch_ports_controller = client.switch_ports
collect = {}
serial = 'Q2DX-XXXX-XXXX'
collect['serial'] = serial
number = '23'
collect['number'] = number
update_device_switch_port = UpdateDeviceSwitchPortModel()
update_device_switch_port.enabled = True
update_device_switch_port.mtype = 'access'
update_device_switch_port.vlan = 667
update_device_switch_port.poe_enabled = False
update_device_switch_port.isolation_enabled = False
update_device_switch_port.rstp_enabled = True
update_device_switch_port.stp_guard = 'BPDU guard'
update_device_switch_port.link_negotiation = 'Auto negotiate'
update_device_switch_port.udld = UdldEnum.ENUM_ALERT_ONLY
update_device_switch_port.storm_control_enabled = True
collect['update_device_switch_port'] = update_device_switch_port
try:
result = switch_ports_controller.update_device_switch_port(collect)
except APIException as e:
print(e)
Any ideas ? thanks