06-17-2020 03:30 AM
I'm currently developing a script for automating the process of bringing up a new location i DNA-C.
The following steps are completed:
The next step would be:
The GUI version of doing it would be:
PROVISION – Actions – Provision – Provision Device, and then just Next – Next - Deploy.
I have not been able to figure out what API call to use to make this step happen. Are there anyone out there that has this knowledge and is willing to share?
Best regards,
Havard Stubberud
09-15-2020 01:33 PM
Hey @Havard Stubberud,
The easiest way of accomplishing this would be to use a template which deploys those network settings to the device. In the API, there is no "provisioning" of a device, only "deployment" of a template.
The operation is a POST to "https://<YOUR_DNA_CENTER>/dna/intent/api/v1/template-programmer/template/deploy". And I've attached the schema below.
{ "forcePushTemplate": "boolean", "isComposite": "boolean", "mainTemplateId": "string", "memberTemplateDeploymentInfo": [ null ], "targetInfo": [ { "hostName": "string", "id": "string", "params": {}, "type": "string" } ], "templateId": "string" }
To my frustration, I haven't ever been able to include more than one target, so you may have to issue a POST for each device you're "provisioning". Even worse, I have been unsuccessful in getting the deployment to take at all. Looks like the softwareType, deviceType, and softwareVersion are more sensitive than in the GUI.
Your post was made awhile ago, if you've successfully gotten this operation working, we could all use the secret sauce.
09-17-2020 12:23 AM
Thank you! Looking forward to testing your solution.
I have been in contact with TAC, and they told me there is currently no plans for implementing these APIs. I am also running a case with Cisco here in Norway.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide