08-12-2021 04:15 AM
Hi,
Trying to automate the whole process of migrating a branch to SDA. I seem to be missing some calls though, that are important to get the whole way. Version 2.2.2.3.
How do i provision a device once discovery is done? I can assign to site, but not provision?
How can i add a transit-pool to a fabric-transit? Is this a subcall under add_border?
Btw, im using this sdk:
https://dnacentersdk.readthedocs.io/en/latest/api/api.html#dnacenterapi-v2-2-2-3
And the calls could be better documented, so possibly i am missing something here.
Solved! Go to Solution.
08-12-2021 05:34 AM - edited 08-12-2021 05:34 AM
We introduced provision APIs (for both wired and wireless) and this should be available in 2.2.2.3/2.2.2.4 (as well as 2.2.3.x). The API (for wired) is '/dna/intent/api/v1/business/sda/provision-device'.
There is a bug with the API where you will get a failed status, but the actual provisioning will go through. The result may be something like this (for a wired device):
{
"status": "failed",
"description": "No JSON object could be decoded",
"taskId": "122d8a2a-dc34-4759-966c-b22f006f72e7",
"taskStatusUrl": "/dna/intent/api/v1/task/122d8a2a-dc34-4759-966c-b22f006f72e7",
"executionStatusUrl": "/dna/intent/api/v1/execution-status/d7971672-3323-49b5-bb3c-06a3f47f9edc",
"executionId": "d7971672-3323-49b5-bb3c-06a3f47f9edc"
}
But you'll see all the necessary provisioning configuration pushed to the device. Please note though, the template option from the UI is de-coupled in the APIs. This API only provisions a device to a particular site, and pushes relevant site specific configuration to it. If you'd like to provision a dayN template as well, there is a separate API for it which can be used.
We do not have APIs for transit network creation, unfortunately. Several others are missing as well. Please feel free to continue to post here and I can validate if a specific API is truly missing or you just haven't found it.
Cheers,
Aninda
08-12-2021 04:37 AM
Not sure if this helps you : here is cisco dev link, which is updated based on the available features as i know :
https://developer.cisco.com/docs/dna-center/#!cisco-dna-2-2-3-api-overview
08-12-2021 05:22 AM
I always refer to the link @balaji.bandi shared. Within DNAC you can also use the make-a-wish for missing APIs that would be beneficial to have. Lastly, ping your Cisco rep for roadmapped API plans.
08-12-2021 05:34 AM - edited 08-12-2021 05:34 AM
We introduced provision APIs (for both wired and wireless) and this should be available in 2.2.2.3/2.2.2.4 (as well as 2.2.3.x). The API (for wired) is '/dna/intent/api/v1/business/sda/provision-device'.
There is a bug with the API where you will get a failed status, but the actual provisioning will go through. The result may be something like this (for a wired device):
{
"status": "failed",
"description": "No JSON object could be decoded",
"taskId": "122d8a2a-dc34-4759-966c-b22f006f72e7",
"taskStatusUrl": "/dna/intent/api/v1/task/122d8a2a-dc34-4759-966c-b22f006f72e7",
"executionStatusUrl": "/dna/intent/api/v1/execution-status/d7971672-3323-49b5-bb3c-06a3f47f9edc",
"executionId": "d7971672-3323-49b5-bb3c-06a3f47f9edc"
}
But you'll see all the necessary provisioning configuration pushed to the device. Please note though, the template option from the UI is de-coupled in the APIs. This API only provisions a device to a particular site, and pushes relevant site specific configuration to it. If you'd like to provision a dayN template as well, there is a separate API for it which can be used.
We do not have APIs for transit network creation, unfortunately. Several others are missing as well. Please feel free to continue to post here and I can validate if a specific API is truly missing or you just haven't found it.
Cheers,
Aninda
08-12-2021 05:41 AM
Might have overlooked this, but maybe this is it for provision:
provision_wired_device(deviceManagementIpAddress=None, siteNameHierarchy=None, headers=None, payload=None, active_validation=True, **request_parameters)
I will give it a go - i guess the SDK arent fully up to date on the actual API, but i can write a wrapper for the things that are missing. Would be good to get the transit-piece in there though, as it creates this manual hickup i would like to avoind for hundreds of sites
Thanks guys!
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