published

dnac-api-scripts

Collection of standalone scripts I used with DNA Center APIs.
You can follow the repository as new scripts will be added over time.

Check Cisco DNA Center APIs documentation here:
https://developer.cisco.com/docs/dna-center/

List of scripts

dnac_get-all-configs

Prerequisites

  • Cisco DNA Center
    • Release: 1.3.0.x - 1.3.3.x
  • Python
    • Version 3.x

Demo using Cisco DNA Center Sandbox

While running the demo, there was 4 devices in DNA Center Inventory.
After the execution of the script, the 4 configuration files for these equipements are saved along the script.


(running with https://sandboxdnac.cisco.com/)

Usage

  • When using the script for the first time
    • First, download or clone this repository
      • git clone https://github.com/nicolas-poirier/dnac-api-scripts.git
    • Go to the cloned repository directory
      • cd dnac-api-scripts
    • Install Python required packages using the requirements file
      • pip install -r requirements.txt

You are now ready to use the script!

  • On Linux and MacOS, it may be needed to use the python3 command to specify the version of Python
  • System Args
    • Help section:
$ python dnac_get-all-configs.py --help
usage: dnac_get-all-configs.py [-h] --dnac DNAC -u USER -p PASSWORD
                               [-v {True,False}]

Backup all configuration files from equipments in Cisco DNA Center inventory

optional arguments:
  -h, --help            show this help message and exit
  --dnac DNAC           IP Address or FQDN of DNA Center Server
  -u USER, --user USER  username to authenticate on DNA Center
  -p PASSWORD, --password PASSWORD
                        password to authenticate on DNA Center
  -v {True,False}, --verify {True,False}
                        enable HTTPS certificate verification (Optional,
                        Default=True)

Authors & Maintainers

License

This project is licensed to you under the GNU General Public License v3.0.

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.