Meraki Auto VPN Topology

This script visualises topology for Meraki AUTO VPN. The script uses The Meraki Dashboard API Python library to get data. It draws topologies using graphviz.

Setup

Use requirements file to install python libraries.

pip install -r requirements.txt

You also need to install binaries for graphviz. Please follow instructions in this link

https://pygraphviz.github.io/documentation/stable/install.html

Usage

You'll need to provide Meraki Dashboard API to pull the data. You have different options to do it:

  1. Export your API key as an environment variable, for example:

    export MERAKI_DASHBOARD_API_KEY=YOUR_KEY_HERE
  2. Script will ask you for API key if it's not defined as an environmental variable or in the code. Just copy/paste it and hit enter.

  3. Alternatively, define your API key as a variable in your source code; this method is not recommended due to its inherent insecurity.

Run the script.

python main.py

Script will create output and datajson directories. Output will store topology outputs in pdf format and graphviz files. Datajson stores infirmation which was pulled from the Dashboard API.

Examples

You can find examples in pdf format in the examples folder.

View code on GitHub

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.