cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
780
Views
20
Helpful
2
Replies

API->SDA->Add Site In SDA Fabric error: fabricName with white spaces not allowed in fabric site request

Taniadv
Level 1
Level 1

Hi All,

 

Hope you are well.

Adventuring in the realm of APIs, so bear with me. 

 

For our customer we have an existing DNAC fabric named: "XYZ Fabric"

Now we are trying to use the API->SDA->Add Site In SDA Fabric to add 80+ sites  (POST /dna/intent/api/v1/business/sda/fabric-site), however when passing the request parameter "fabricName": "XYZ Fabric", we get:

"status": "failed",
"description": "fabricName with white spaces not allowed in fabric site request..",

 

Moreover, when we used another API that has as query parameter fabricName and passes it in the URL, for example to get information regarding the SDA Fabric (GET dna/intent/api/v1/business/sda/fabric?fabricName=XYZ Fabric), and as query parameter we have fabricName: "XYZ Fabric", it works as we get the following output:

"status": "success",
"description": "Fabric info successfully retrieved from sda fabric.",
"fabricName": "XYZ Fabric",
"fabricType": "ConnectivityDomain",
"fabricDomainType": "FABRIC_LAN"

 

Futhermore, we used another API to get information about a site in that fabric, to check what information it would return for the parameter fabricName. We used (/dna/intent/api/v1/business/sda/fabric-site?siteNameHierarchy=Global/SD-WAN/Site80) with query parameter as siteNameHierarchy: Global/SD-WAN/Site80

"status": "success",
"description": "Fabric Site info successfully retrieved from sda fabric.",
"fabricName": "XYZ_Fabric",
"fabricSiteName": "Global/SD-WAN/Site80",
"fabricType": "ConnectivityDomain",
"fabricDomainType": "FABRIC_SITE"

 

From the above we noticed the fabricName information returned was using an "_", so we tried again the API to add the fabric site with fabricName: "XYZ_Fabric", however now we get the following as a response.

"status": "failed",
"description": "Could not find Fabric with name = XYZ_Fabric",

 

Which leads us to conclude the fabricName is stored as XYZ Fabric, with a white space, like it is displayed in the DNAC GUI.

Lastly, we also tried "fabricName": "XYZ\u0020Fabric", and also did not work.

 

Any suggestions on how can we overcome this "fabricName with white spaces not allowed in fabric site request"

 

Thank you in advance.

1 Accepted Solution

Accepted Solutions

Aninda Chatterjee
Cisco Employee
Cisco Employee

This is a bug (the fact that you can't add a fabric site with white spaces or have a fabric itself with a white space), specifically CSCvy19107. I don't see any other way around this apart from re-naming it to not include whitespaces.

View solution in original post

2 Replies 2

Aninda Chatterjee
Cisco Employee
Cisco Employee

This is a bug (the fact that you can't add a fabric site with white spaces or have a fabric itself with a white space), specifically CSCvy19107. I don't see any other way around this apart from re-naming it to not include whitespaces.

Hi Aninda,

 

Thank you for your reply. 

To rename it, in the GUI I only see the option to delete the existing one and re-creating it (as that is quite some work). Am I missing something? Or do you mean reach out to Cisco TAC for this task?

 

Thank you.

 

PS. TAC confirmed there is no option to re-name the fabric once created. 

"So far, fabric name is not possible to change once it is configured due to the fabric name is used to manage the devices inside of it. The option that you can do is delete the current one and then create a new fabric with the correct name and move the devices into the new fabric however, you need to keep in mind that this action will be disruptive and you will need to do it in a maintenance window.

The issue CSCvy19107 seems to be fixed from 2.2.3.x release onwards"