Hi ,
Some recent changes to getOrganizationSwitchPortsStatusesBySwitch have broken my code and pagination.
I don't condider my self great with Python or programmation in general so bear with me.
The output is now a dict instead of a list. How do you handle that output when receiving multiple pages ? Dicts were easy , you simply do final_list = final_list + new_list at every page and it grows into a big list voilà !
With dicts I can't do that.
Example of the output :
{
"items": [
{
"name": "xxxxxxxx",
"serial": "xxxx",
"mac": "xxxxx",
"network": {
"id": "xxxxxxxxx",
"name": "xxxxx"
},
"model": "MS225-24P",
"ports": [
{
"portId": "1",
"enabled": true,
"status": "Connected",
"isUplink": true,
"errors": [],
"warnings": [],
"speed": "1 Gbps",
"duplex": "full",
"securePort": {
"active": false,
"authenticationStatus": "Enabled"
},
"spanningTree": {
"statuses": [
"Forwarding",
"Is edge",
"Is peer-to-peer"
]
},
"poe": {
"isAllocated": false
}
}]
]
}
The only "solution" ( which is probably disgusting ) is to get the list of items and put them in a list.
Using the Meraki Python SDK is not an option in my case and I'm not debating why, that's not the point.
Thanks ! 😊