Package: dnac-sidekick
dnac-sidekickDNAC Sidekick is a CLI app used to interact with Cisco DNA Center (DNAC). It's built using theClickandRichlibraries. The Rich library is what helps make the output look cleaner to the end-user.The goal of the tool is to provide a clean and user-friendly CLI interface to quickly pull information from DNA Center. All interactions with DNAC uses DNA Center's REST API, so please make sure that the REST API is enabled and the user account(s) used with this tool have proper API permissions.InstallationInstall usingpipor any other PyPi package manager:pip install dnac-sidekickGetting StartedAuthenticating to DNACDNAC-Sidekick pulls all user-specific information from environmnet variables. Ideally, this would be a more automated process with less manual work for the user, but for now, the following environment variables must be set manually before using the tool:export DNAC_URL=<https://dnac_url>
export DNAC_USER=<username>
export DNAC_PASS=<password>Once set, we will need to generate a bearer token, which is used to authenticate to the DNAC REST API. You can manually generate this token using curl or Postman, but there's also a built-in command that will generate one for you. This will only work if the URL, username, and password environment variables are set.dnac-sidekick login 

Token generated successfully!
Copy token below and set as environment variable for future requests:
eyJhbGciOiJS.....IMPORTANT:Please make sure to generate the bearer token using thednac-sidekick logincommandAFTERsetting the necessary environment variables. Once the token is generated, don't forget to set it as an environment variable as well.export DNAC_TOKEN=<token>UsageTo see what commands are available, use the--helpoption. Here's a brief look at the current root commands available:Options:
  --help  Show this message and exit.

Commands:
  command-runner  Run 'show' commands on network devices in DNAC.
  generate        Action to generate testbeds and inventory files.
  get             Action for read-only tasks and gathering information.
  login           Use username and password to authenticate to DNAC.Feature HighlightsThe goal is to provide features that help extract the most useful information from DNAC for the user. The tool is not built to have a command for every available DNAC API call - it's simply meant to be an engineer'ssidekick:grin: when interacting with Cisco DNA Center. This feature list will grow, but here are the current tasks that can be performed using DNAC Sidekick:InventoryDevice information (all devices or a specific device via hostname)HostnameDevice typeSerial numberSoftware versionDevice license informationNetwork license levelDNA license levelLicense validity (valid or expired)Virtual accountDevice UDIAssuranceDevice healthClient healthAllWiredWirelessCommand RunnerRunvalidshowcommands on any device in DNAC inventoryValidshowcommands are dictated by DNACGenerateAbility to generate a pyATS testbed file from DNAC inventoryAbility to generate an Ansible inventory file from DNAC inventoryExamples:Inventory# All devices
dnac-sidekick get inventory devices

# Specific device
dnac-sidekick get inventory devices --hostname leaf1.abc.inc

# License info
dnac-sidekick get licensesAssurance# Device health
dnac-sidekick get health devices

# Client health
dnac-sidekick get health clientsCommand Runnerdnac-sidekick command-runner --device leaf1.abc.inc --command "show run"Generate# pyATS testbed
dnac-sidekick generate pyats-testbed

# Ansible inventory
dnac-sidekick generate ansible-inventorySample OutputsAll sample outputs use the Cisco DevNet Always-on DNAC sandbox.Network InventoryNetwork Inventory - Specific DeviceDevice LicensingDevice HealthClient HealthCompatibilityTested with:DNA Center 2.2.3.4DNA Center 2.2.3.6DNA Center 2.3.4.0If you are able to test with other versions, please open a PR and add it to the list!CreditsThis section is dedicated to those that have helped test and make this tool better!raoulmorik