Skip to content

Hey everyone!

Hope everyone is doing well this Christmas time and I am sure many are enjoying their break over what has been a very challenging year for many. I just wanted to share what I have been cooking in my Python kitchen in what I hope will be one of many future posts to come as I develop the application further.


Within any organisation, there are always challenges with maintaining configuration standards not to mention the old naming convention chestnut. I wanted a way in which I could solve these problems within my organisation and do it in programmatic way, and thus building on my love for network automation.

Meraki Templates

In order to solve this problem I turned to Meraki templates. I am not going to get in depth with Meraki templates in this post because that requires a whole seperate discussion. Templates allow me to make an application that simply allocates templates based on brands and their geographical locations. This is actually quite critical and key.

The code doesn’t hold network configuration!

Because the network configuration isn’t maintained in the Python code. It is maintained and updated via the Meraki dashboard template area. This eliminates the need for a network engineer to maintain the code, or help desk staff or various people who might maintain configuration. I hope that all these aforementioned people are able to maintain the code, but the critical part is that someone without network knowledge does not need to contribute or maintain the code, it is abstract to it. How does this work out practically?

Bob the Network Engineer…

Bob the Network Engineer has been requested to deploy Meraki devices across hundreds of sites, he knows the configuration he wants for each one so he makes a template. Once Bob has this template, he can just link it to this application and the respective brand. He then goes and makes 20 sites.

But wait the business wants a change!

Whoa, who saw this coming? I sure didn’t…

Said no one ever…

SO now Bob updates the template configuration, this then works at all current 20 sites, because as soon as you update the template it applies to all bound networks. He then continues on using the application and does not need to update the code in the application as application simply continues to bind this configuration that has been updated. The application sits outside of the configuration and thus is more maintainable and adaptable. This has been a key point in my development. I plan in the long term to be far more dynamic with the current code to allow for greater breadth of unique business case scenarios and allow for more dynamic usage of the application. This will come in the form of a function which will allow the end user to make configuration customisation via the application.

In Development & current feature list

I want to be clear this project is still in it’s early infancy. The code is not elegant, there are a lot of things I need to learn and also clean up. There are most likely 1000 things be doing better with the code. There are also features I have talked about here which are not there yet. They will be coming in future releases. For now, this is what the code can do.

Current list of features

  1. Obtain list of serial numbers of devices to import either via directly entering into the Python console, via CSV or via Meraki Order Number.
  2. Confirm the list of serial numbers and their respective devices that belong to the respective serial numbers.
  3. Claim Meraki devices (but not unclaim as no Meraki API call to do this currently!)
  4. Create a Meraki network and name the network based on inputted and selected choices
  5. Claim previously entered devices into the respective network
  6. Bind network to a template

Future list of features in next release

  1. Basic error checking in all current manual steps
  2. Move text_menu() function to being more dynamic and not having to configure each input result with its own really unique set of logic and thus allowing for modular adaptation by users within their various organisations
  3. Dynamically pull brand regions they are in and present that to the user rather than being a static string print statement
  4. Naming of network devices
  5. Text or email confirmation work done and details of created site (ip, vlan’s etc…)

Shut up Daniel and show me how it works!

Alright here we go guys, here is a demo run through of my code, please note that I have removed the step which shows the serial numbers of the Meraki trial devices I used in the testing of this code. So if and when you run it, you will get confirmation step to confirm correct serial numbers.

Please remember this is early release and much work is to be done!

Merrry Christmas Y’all!

Git Repo:

Leave a Reply

Skip to toolbar