Open rukapse opened 2 weeks ago
Hello I hope you are well.
In the documentation of Cisco, which can be found in https://developer.cisco.com/docs/dna-center/add-update-or-remove-ssid-mapping-to-a-vlan/
Here he tells us that the request body must have a specific format. As can be in the following image.
This is why you get the error "Invalid parameters”. You need to adjust the payload. An example could be the following.
add_update_or_remove_ssid_mapping_to_a_vlan(fabric_id='b6af9074-b1d8-4b40-82f9-776d34adb0fc', payload= [{"vlanName": "string", "ssidDetails": [ ]}] )
I await your confirmation to see if this was able to resolve your problem.
Hello Jose,
Thank your for clarifying this, i’lll go ahead and try it out!
From: JosePabloOcampo1212 @.> Sent: Thursday, November 7, 2024 3:58:22 PM To: cisco-en-programmability/dnacentersdk @.> Cc: Rugvedi Kapse (rukapse) @.>; Author @.> Subject: Re: [cisco-en-programmability/dnacentersdk] Remove ALL VLANs and SSIDs mapped to VLANs exits with a VALIDATION_ERROR. (Issue #175)
Hello I hope you are well.
In the documentation of Cisco, which can be found in https://developer.cisco.com/docs/dna-center/add-update-or-remove-ssid-mapping-to-a-vlan/
Here he tells us that the request body must have a specific format. As can be in the following image.
Captura.de.pantalla.2024-11-07.a.las.5.28.10.p.m.png (view on web)https://github.com/user-attachments/assets/8d5536fb-cd29-4d2f-9ada-2a1528e27a56
This is why you get the error "Invalid parameters”. You need to adjust the payload. An example could be the following.
add_update_or_remove_ssid_mapping_to_a_vlan(fabric_id='b6af9074-b1d8-4b40-82f9-776d34adb0fc', payload= [{"vlanName": "string", "ssidDetails": [ ]}] )
I await your confirmation to see if this was able to resolve your problem.
— Reply to this email directly, view it on GitHubhttps://github.com/cisco-en-programmability/dnacentersdk/issues/175#issuecomment-2463452929, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVKPKMG7QWMUS6LM3NRVQ3LZ7P5B5AVCNFSM6AAAAABRKEUUQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRTGQ2TEOJSHE. You are receiving this because you authored the thread.Message ID: @.***>
Was your problem resolved?
Hello Jose,
Unfortunately, not yet, tried with three different sets of Inputs, but am still encountering an Error.
Input 1: {'fabric_id': 'b6af9074-b1d8-4b40-82f9-776d34adb0fc', 'payload': [{'vlanName': '', 'ssidDetails': []}]
Error Encountered for Input 1: Error: The client made a request for a resource that does not exist, No matching VLAN found with vlanName: . {'fabric_id': 'b6af9074-b1d8-4b40-82f9-776d34adb0fc', 'payload': [{'vlanName': '', 'ssidDetails': []}]
"response": "An error occurred while executing API call to Function: 'add_update_or_remove_ssid_mapping_to_a_vlan' from Family: 'fabric_wireless'. Parameters: {'fabric_id': 'b6af9074-b1d8-4b40-82f9-776d34adb0fc', 'payload': [{'vlanName': '', 'ssidDetails': []}], 'active_validation': False}. Exception: An error occured when executing operation for the family 'fabric_wireless' having the function 'add_update_or_remove_ssid_mapping_to_a_vlan'. The error was: status_code: 404, {\"response\":{\"errorCode\":\"NCWS23002\",\"message\":\"The client made a request for a resource that does not exist\",\"detail\":\"No matching VLAN found with vlanName: .\"},\"version\":\"1.0\"}."
Input 2: '{'fabric_id': 'b6af9074-b1d8-4b40-82f9-776d34adb0fc', 'payload': [{'vlanName': ''}]}'
{'endTime': 1731583297873, 'status': 'FAILURE', 'startTime': 1731583297835, 'version': 1731583297873, 'resultLocation': '/dna/intent/api/v1/tasks/01932a68-492b-7f7e-a504-51fb01e1a2c6/detail', 'id': '01932a68-492b-7f7e-a504-51fb01e1a2c6'}
Task Details: { "errorCode": 1083, "message": "Resource not found.", "detail": "Invalid object id: 01932a68-492b-7f7e-a504-51fb01e1a2c6" }
Input 3: '{'fabric_id': 'b6af9074-b1d8-4b40-82f9-776d34adb0fc', 'payload': [{}]}' {'endTime': 1731584031053, 'status': 'FAILURE', 'startTime': 1731584031019, 'version': 1731584031053, 'resultLocation': '/dna/intent/api/v1/tasks/01932a73-792b-74a2-88da-8bb2e0c67ae6/detail', 'id': '01932a73-792b-74a2-88da-8bb2e0c67ae6'}
{ "errorCode": 1083, "message": "Resource not found.", "detail": "Invalid object id: 01932a73-792b-74a2-88da-8bb2e0c67ae6" }
Note: The delete all functionality is supported from the Catalyst Center – By simply passing an empty list [].
@. @.
From: JosePabloOcampo1212 @.> Date: Tuesday, November 12, 2024 at 3:06 PM To: cisco-en-programmability/dnacentersdk @.> Cc: Rugvedi Kapse (rukapse) @.>, Author @.> Subject: Re: [cisco-en-programmability/dnacentersdk] Remove ALL VLANs and SSIDs mapped to VLANs exits with a VALIDATION_ERROR. (Issue #175)
Was your problem resolved?
— Reply to this email directly, view it on GitHubhttps://github.com/cisco-en-programmability/dnacentersdk/issues/175#issuecomment-2471795974, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVKPKMFXOOH6FMPZK26TG632AKCWXAVCNFSM6AAAAABRKEUUQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZRG44TKOJXGQ. You are receiving this because you authored the thread.Message ID: @.***>
Hello, is there any update on this?
I'm currently reviewing the problem.
Prerequisites
Describe the bug
Attempting to provide an empty payload to remove all the VLANs and SSIDs mapped to a VLAN using the add_update_or_remove_ssid_mapping_to_a_vlan() API from fabric_wireless exits with VALIDATION_ERROR error.
Requested payload for the the function: 'add_update_or_remove_ssid_mapping_to_a_vlan' is: {'fabric_id': 'b6af9074-b1d8-4b40-82f9-776d34adb0fc', payload: []}
status_code: 400, {"response":{"errorCode":"VALIDATION_ERROR","message":"Invalid parameters specified for required operation","detail":"Invalid parameters specified for required operation","href":""},"version":"1.0"}
Expected behavior
Screenshots
Environment (please complete the following information):
Additional context Add any other context about the problem here.