cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
927
Views
0
Helpful
3
Replies

Provision devices via API

LeroyW
Level 1
Level 1

I've been dabbling in DNA Center automation. I'm using Python and I can create just about everything I need so far:

site hierarchy, (global) IP pools, network settings (DHCP, AAA, DNS), discover devices, etc.

 

However there seem to be missing some crucial parts, like actually reserving IP pools and provisioning devices to a site, which is a requirement for the later stuff, like fabric creation/management (which does exist, although it's flagged BETA in the docs).

 

Am I missing something or do these not exist? Does anyone know if there are plans for integrating these?

 

It makes for an odd workflow:

  • Automate device discovery (and assign to site)
  • Go into GUI and provision
  • Automate fabric stuff
3 Replies 3

Mike.Cifelli
VIP Alumni
VIP Alumni

This is awesome. Glad to know that others are having automation adventures with DNAC. If you are running version 1.3.3.x take a look here as you should absolutely be able to accomplish a few items you mentioned: https://developer.cisco.com/docs/dna-center/api/1-3-3-x/

I actually created an auto tool that automates a few phases in regard to:
-Add device to inventory in DNAC
-Assign NAD to site in DNAC
-Update unique NAD fields in ISE so that authz policies were not conflicting
Two other things I was trying to target were:
-Provision device to fabric
-Provision interfaces for host onboarding for user devices and closed auth template
Unfortunately, I hit a bug relating to siteName hierarchy which we have not resolved so the provisioning device to fabric phase is on hold until we change siteName. The issue is that our siteName has a space in it. I have been advised by several Cisco BU reps that it should be seamless to change the siteName to remove the space, but have not implemented the change yet. The issue with provisioning interfaces is that there are throttling concerns (5 requests per minute) so you would have to write your code to meet those requirements.

See an older post I shared for more detail: https://community.cisco.com/t5/cisco-digital-network/auto-tool-to-add-edge-node/td-p/4052012

 

Lastly, please 'make-a-wish' using the DNAC gui for anything that you feel would be a nice feature request in future releases.  Good luck & HTH!

Thanks for the reply.

 

I've been switching between https://developer.cisco.com/docs/dna-center/api/1-3-3-x/ and DNA Center's internal API docs. Sometimes the other gives a clue to what the request items are actually supposed to be.

 

Correct me if I'm wrong, but adding a Network Access Device in ISE is not the same as Actions > Provision > Provision Device > Next > Next > Deploy - so no luck there.

 

I guess I'll do the Make-A-Wish thing then.

Correct me if I'm wrong, but adding a Network Access Device in ISE is not the same as Actions > Provision > Provision Device > Next > Next > Deploy - so no luck there.
-When you add device to site (identified above as step 2) the NAD is added in ISE via the pxgrid connection between DNAC & ISE. The phase 3 I mentioned in the shared tool updates unique fields once the device is already a NAD in ISE.
Try taking a look at API Developer Toolkit in DNAC: Platform->Developer Toolkit->APIs. This should provide required/optional fields to utilize them. Lastly, you could try playing with this API (Add edge device in SDA Fabric). HTH!

Review Cisco Networking for a $25 gift card