This repository contains a few simple scripts to get started with Cisco DNA Center API.
You will need the requests[secure] python module.
pip install requests[secure]
You change the controller credentials either through environment variables or by editing the dnac_config.py file
This script will show all of the network devices in the inventory of Cisco DNA Center.
./01_network_device.py
./01_network_device.py 10.10.22.70
This script shows all of the interfaces connected to a specific device.
./02_interface_device.py 10.10.22.70
Shows the software license information for a device.
./03_device_license.py 10.10.22.70
Locates a host by IP address or mac address. Can also be extended to user lookup.
./04_find_host.py --ip 10.10.22.114
./04_find_host.py --mac 00:1e:13:a5:b9:40
Traces the path from host A to host B through the network
./05_path_trace.py --srcip 10.10.22.114 --dstip 10.10.22.98