This repository is deprecated; please follow the main search page or use the ‘Related code repos’ widget on the right side of the current page.

DNA Center API Samples

Digital Network Architecture Center (DNAC) is Cisco's controller for campus and WAN environments.

It provides automation and assurance capabilities for routers, switches and wireless LAN.

DNAC exposes a set of northbound API which are used by this collection of scripts and tools.

Getting Started

Clone this repository.
git clone https://github.com/CiscoDevNet/dnac-samples-aradford.git

sample_code

has examples of python requests code for the following API:

  • PnP (Plug and Play) : shows how to create, upload, delete files, projects and rules
  • SWIM Software Image Mananagement tools
  • Tag tools for managing device tags. Required for SWIM
  • Top5 : examples of utilities for:
    • network-device: list all of the devices on the controller and their attributes
    • interface: show the interface utilization of a switch (number of interfaces in use, and the hosts/vlan attached)
    • license: shows license information for a device
    • host: find_my_host. shows where a host is connected in the network
    • path_trace: shows the path between two hosts on the network

tools

contains a postman collection for interacting with an always on sandbox. You can change the variables to point to your
own DNAC server.

uniq_samples

uniq is a client library for DNAC. It abstracts the REST API endpoints and allows you to interact with python objects.

I have modified the uniq library from APIC-EM to work with DNAC. This is not the officially supported version.

  • uniq contains the client library code. You will need to install this to use the examples.
  • code_samples contains examples for PnP and other simple use cases
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.