cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1522
Views
0
Helpful
2
Replies

DNAC-Python-Wrapper

The modules herein simplify placing calls to Cisco's DNA Center. They handle all the complexity involved with making CRUD calls to Cisco DNAC including:

  • Automatically logging in and getting an XAuth token
  • Formatting URLs and filters to control requests to Cisco DNAC
  • Parsing responses from Cisco DNAC and converting from json text into python objects
  • Installation and Usage

First, use the command pip install dnac to download the package and install it in your python site package listing.

Then, edit the wrapper's configuration file, dnac_config.py, with your Cisco DNA Center cluster information. Look in the directory python-root-dir/Lib/site-packages/dnac/ for the configuration file.

After installing the wrapper, import the Dnac class directly from the package but treat the various API modules as sub-packages. For example:

from dnac import Dnac

d = Dnac()

from dnac.networkdevice import NetworkDevice

switch = NetworkDevice(d, "mySwitch")
2 Replies 2

mygroundmode
Level 1
Level 1

@BrisaSchroeder69978 wrote:

The modules herein simplify placing calls to Cisco's DNA Center. They handle all the complexity involved with making CRUD calls to Cisco DNAC including:

  • Automatically logging in and getting an XAuth token
  • Formatting URLs and filters to control requests to Cisco DNAC
  • Parsing responses from Cisco DNAC and converting from json text into python objects
  • Installation and Usage

First, use the command pip install dnac to download the package and install it in your python site package listing.

Then, edit the wrapper's configuration file, dnac_config.py, with your Cisco DNA Center cluster information. Look in the directory python-root-dir/Lib/site-packages/dnac/ for the configuration file.

After installing the wrapper, import the Dnac class directly from the package but treat the various API modules as sub-packages. For example:

from dnac import Dnac

d = Dnac()

from dnac.networkdevice import NetworkDevice

switch = NetworkDevice(d, "mySwitch")

Cisco DNA Center is a centralized network control and management dashboard for Cisco DNA, an intent-based networking solution.

This project provides a sample Python application and client libraries to access the Platform REST APIs for the Python language. The included sample application performs the following functions:

  • Authenticates with Cisco DNA Center
  • Retrieves a count of the number of networking devices listed in the inventory
  • Displays a high level summary of the networkings devices listed in the inventory

By default the sample application has disabled SSL certificate checking when connecting to Cisco DNA Center, but this can be re-enabled if desired. Mygroundbiz com

tinallen
Level 1
Level 1

@BrisaSchroeder69978 wrote:

The modules herein simplify placing calls to Cisco's DNA Center. They handle all the complexity involved with making CRUD calls to Cisco DNAC including:

  • Automatically logging in and getting an XAuth token
  • Formatting URLs and filters to control requests to Cisco DNAC
  • Parsing responses from Cisco DNAC and converting from json text into python objects
  • Installation and Usage

First, use the command pip install dnac to download the package and install it in your python site package listing.

Then, edit the wrapper's configuration file, dnac_config.py, with your Cisco DNA Center cluster information. Look in the directory python-root-dir/Lib/site-packages/dnac/ for the configuration file.

After installing the wrapper, import the Dnac class directly from the package but treat the various API modules as sub-packages. For example:

from dnac import Dnac

d = Dnac()

from dnac.networkdevice import NetworkDevice

switch = NetworkDevice(d, "mySwitch")

You need to note down the steps mentioned below in order to participate in this survey. McDVOICE

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: