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

Provision network settings to device

I'm currently developing a script for automating the process of bringing up a new location i DNA-C.

 

The following steps are completed:

  • Discover device(s) on the location
  • Create site hierarchy
  • Assign device(s) to the created site
  • Software image distribution
  • Software image activation

The next step would be:

  • Provision network settings (AAA Server, DHCP Server, DNS Server, SYSLOG Server, SNMP Server etc.) on to the device

 

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

2 Replies 2

Kenneth.Grace
Level 1
Level 1

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.

 

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.

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: