DNAC-Template-Deploy

Deploy templates

This script allows you to deploy at scale by consuming the deploy API of DNAC. DNAC can deploy up to 100 devices per API call; On line 39 of the main.py you can set your group size (1 to 100) by changing the integer value of the group_size variable. Lets say we want to deploy a template across 1000 devices; if we set the group size to 100 then the script will make a total of 10 API calls (10 groups of 100). FYI The deploy API is rate limited to 100 calls per minute.

  1. Check Requirements.txt for library dependencies.
  2. Run the main.py script from terminal or your favorite IDE. You will be prompted for the DNAC URL, username and password.
    Look at screenshot below for correct format on URL.

dnaclogin

  1. Select Platform to deploy on and hit Enter and confirm your choice. Platforms are numbered on the left starting from 0-X (e.g enter 3 and press enter). Confirm your choice y/n.

platforms

  1. Select a Project name that houses templates. Projects are numbered on the left starting from 0-X (e.g enter 3 and press enter). Confirm your choice y/n.

project

  1. Select a Template to deploy. Templates are numbered on the left starting from 0-X (e.g enter 3 and press enter). Confirm choice y/n.

tempid

  1. Results.

result

published

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.