08-18-2022 11:10 PM
So we have upgraded DNA to 2.3.3.3. The API is getting better, and we are close to actually automating the whole process of migrating a vanilla switched site to a SDA fabric. However theres one API-call that i cant get to work. The "Add border"-call to add roles to devices in a fabric. Here, it now is possible to send in ["Border_Node", "Control_Plane_Node","Edge_Node"]. This in my mind should create a fabric in a box, as we have many locations with just one 9300 and needs all roles. But, when i make the call, the device only gets the Control Plane role. The URL for this call is:
https://dnac-ip/dna/intent/api/v1/business/sda/border-device
The log on DNA after the call:
Received request to add device switchname with role(s) [ENDPOINT_PROXY, MAPSERVER, EDGENODE, BORDERNODE] to Fabric Site Global/test/testsite_Default_LAN_Fabric.
Appears to be accepted OK, but the role in the fabric for this device just has the "CP" badge, appears that the border config is just skipped. The payload looks like this:
{
"deviceManagementIpAddress": 1.2.3.4,
"siteNameHierarchy": sitenamehierarchy,
"deviceRole": ["Border_Node", "Control_Plane_Node", "Edge_Node"],
"externalDomainRoutingProtocolName": "BGP",
"externalConnectivityIpPoolName": site_transit_pool,
"internalAutonomouSystemNumber": "66666",
"borderPriority": "10",
"connectedToInternet": True,
"sdaTransitNetworkName": "test-transit",
"borderWithExternalConnectivity": True,
"externalConnectivitySettings": [
{
"interfaceName": "GigabitEthernet1/1/1",
"externalAutonomouSystemNumber": "66665",
"l3Handoff": [
{
"virtualNetwork": {
"virtualNetworkName": "testvrf1",
"vlanId": "3001"
}
}
]
}
]
Anyone gotten this to work? Just DNACenterSDK through Python to call.
Solved! Go to Solution.
09-18-2022 11:55 AM
For anyone stumbling across this, to make this call work, this is a workable payload:
[{
"deviceManagementIpAddress": «1.1.1.1»,
"siteNameHierarchy": "Global/Sites/Site»,
"deviceRole": ["Border_Node", "Control_Plane_Node", "Edge_Node"],
"externalDomainRoutingProtocolName": "BGP",
"externalConnectivityIpPoolName": «transit_pool»,
"internalAutonomouSystemNumber": "64666",
"borderPriority": "10",
"borderSessionType": "ANYWHERE",
"connectedToInternet": "True",
"borderWithExternalConnectivity": "True",
"externalConnectivitySettings": [
{
"interfaceName": "GigabitEthernet1/1/1»,
"externalAutonomouSystemNumber": "64667»,
"interfaceDescription": «mandatory interface description»,
"l3Handoff": [
{
"virtualNetwork": {
"virtualNetworkName": «vrf1»,
"vlanId": "3101"
}
},
{
"virtualNetwork": {
"virtualNetworkName": «vrf2,
"vlanId": "3102"
}
},
{
"virtualNetwork": {
"virtualNetworkName": «vrf3»,
"vlanId": "3103"
}
}
}
]
}
]
}
]
Have to be tweaked a bit to use with DnacenterSDK, but the structure works. So many quirks about this API, in this call, the booleans are no longer boolean, but strings with "True" or "False" in them. If youre using SDA-transits, check the docs for correct values, some parameters will change.
08-19-2022 08:48 AM
This sounds like a possible bug to me. Would you please open a TAC case to have them investigate?
08-19-2022 11:17 AM
Yea, can do. But this should work with the payload i have sent?
08-19-2022 01:24 PM
It didn't give you an error and told you, "Received request to add device switchname with role(s) [ENDPOINT_PROXY, MAPSERVER, EDGENODE, BORDERNODE] to Fabric Site Global/test/testsite_Default_LAN_Fabric." so that should mean the payload is ok. The API should be user friendly, and it clearly isn't friendly enough in this case.
09-18-2022 11:55 AM
For anyone stumbling across this, to make this call work, this is a workable payload:
[{
"deviceManagementIpAddress": «1.1.1.1»,
"siteNameHierarchy": "Global/Sites/Site»,
"deviceRole": ["Border_Node", "Control_Plane_Node", "Edge_Node"],
"externalDomainRoutingProtocolName": "BGP",
"externalConnectivityIpPoolName": «transit_pool»,
"internalAutonomouSystemNumber": "64666",
"borderPriority": "10",
"borderSessionType": "ANYWHERE",
"connectedToInternet": "True",
"borderWithExternalConnectivity": "True",
"externalConnectivitySettings": [
{
"interfaceName": "GigabitEthernet1/1/1»,
"externalAutonomouSystemNumber": "64667»,
"interfaceDescription": «mandatory interface description»,
"l3Handoff": [
{
"virtualNetwork": {
"virtualNetworkName": «vrf1»,
"vlanId": "3101"
}
},
{
"virtualNetwork": {
"virtualNetworkName": «vrf2,
"vlanId": "3102"
}
},
{
"virtualNetwork": {
"virtualNetworkName": «vrf3»,
"vlanId": "3103"
}
}
}
]
}
]
}
]
Have to be tweaked a bit to use with DnacenterSDK, but the structure works. So many quirks about this API, in this call, the booleans are no longer boolean, but strings with "True" or "False" in them. If youre using SDA-transits, check the docs for correct values, some parameters will change.
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