This script uses a number of different genie parses to create a formated markdown file and rendered HTML file of a given core-distribution-access Cisco topology.
Virtual Environment
We recommend running Mind nMap in a Python virtual environment while testing or developing. This will help keep your host system clean and allow you to have multiple environments to try new things. If you are not using a virtual environment, start at the download/clone step below.
You will also need Python 3, pip, and venv installed on your host system.
In your project directory, create your virtual environment
python3 -m venv env
Activate (use) your new virtual environment (Linux):
source env/bin/activate
Download or clone the mind_nmap repository:
git clone https://github.com/automateyournetwork/mind_nmap.git
Install pyATS and markmap into your environment:
pip install pyats[full] sudo apt update sudo apt install npm sudo npm install markmap-cli -g
here is an example of the required testbed file:
*** SINGLE DEVICE ***
devices: Dist: alias: 'Dist' type: 'router' os: 'iosxe' role: dist platform: cat4500 credentials: default: username: admin password: {{password}} connections: cli: protocol: ssh ip: "192.168.1.10" arguments: connection_timeout: 360
*** TOPOLOGY ***
devices: Core: alias: 'Core' type: 'router' os: 'iosxe' role: dist platform: c9600 credentials: default: username: admin password: {{password}} connections: cli: protocol: ssh ip: "192.168.1.1" arguments: connection_timeout: 360 Dist: alias: 'Dist' type: 'router' os: 'iosxe' role: dist platform: cat4500 credentials: default: username: admin password: {{password}} connections: cli: protocol: ssh ip: "192.168.1.5" arguments: connection_timeout: 360 Access: alias: 'Access' type: 'router' os: 'iosxe' role: access platform: cat9300 credentials: default: username: admin password: {{password}} connections: cli: protocol: ssh ip: "192.168.1.10" arguments: connection_timeout: 360
NOTE: Highly recommended to encryt your passwords. Please use the following link for instructions on how to encyrpt your passwords with pyATS.
https://pubhub.devnetcloud.com/media/pyats/docs/utilities/secret_strings.html
we use the custom tag role in our testbed to help build the topology, please lable your devices as core, dist, or access
$ cd mind_nmap $ cd MindMaps $ pyats run job MindMap_job.py --testbed-file ../testbeds/testbed_MindMap.yml
The script will create one Layer 2 network map under /MindMaps/Devices/MindMap.md.
To view the formatted output as a markmap please install the MarkMap extension for VS Code or the files can be view externally by viewng the html versions.
Additionally there will be a markdown file per device that is also created. They will be located in the MindMaps/Network/Devices.
NOTE: the script has only been run on Cisco Catalyst and Nexus devices.
https://developer.cisco.com/pyats/
Using the Cisco DevNet CML Sandbox you can try it for yourself!
Reserve the CML Sandbox
testbed_MindMap.yml
devices: dist-sw01: alias: 'dist-sw01' type: 'switch' os: 'nxos' role: 'access' platform: n9k credentials: default: username: cisco password: cisco connections: cli: protocol: "ssh" ip: "10.10.20.177" arguments: connection_timeout: 360 dist-sw02: alias: 'dist-sw02' type: 'switch' os: 'nxos' role: 'access' platform: n9k credentials: default: username: cisco password: cisco connections: cli: protocol: "ssh" ip: "10.10.20.178" arguments: connection_timeout: 360
Mind Maps for Cisco Identity Services Engine
Use the Cisco Identity Services Engine (ISE) External RESTful Service (ERS) and Monitoring and Troubleshooting (MnT) Application Programmable Interfaces (APIs) to create valid markdown files which then in turn can be rendered as mind maps using the VS Code markmap extension
Provide a link to a related DevNet Sandbox: PX-Grid on ISE 2.0
Owner
Contributors
Categories
Data CenterNetworkingProducts
pyATSCisco Modeling Labs (CML)Identity Services Engine (ISE)Programming Languages
HTMLLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community