When you create a new interface, and Meraki adds an ID to it, and this is what you reference, if you need to update it.
Assume someone logs on to the dashboard, deletes the interface, and creates it again. Now it has a new ID, different from what is in your backup. What will you do? It's the same interface, but a different ID, thus a different interface, when compared to your backup.
Or someone has changed the interface, and something broke. Now you need to recreate it based on your backup. You'll need to get all the interfaces, run through each interface and each setting, and check if it matches your backup. If not, you'll need to update it.
You're going to need to mock up some scenarios inorder to design your way out of it. Python does what you tell it to. There's no intelligance in it. So you'll need to prepare for every possible (and realistic) scenarios.
I'd probably just make the decision that "my backup is the one backup to rule them all", and decide that whatever is configured on the dashboard will be overruled by my backup.
It's a backup of a working system, afterall.
LinkedIn :::
https://blog.rhbirkelund.dk/Like what you see? - Give a Kudo ## Did it answer your question? - Mark it as a Solution
🙂All code examples are provided as is. Responsibility for Code execution lies solely your own.