Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ALL VLANs and SSIDs mapped to VLANs exits with a VALIDATION_ERROR. #175

Open
3 tasks done
rukapse opened this issue Nov 7, 2024 · 10 comments
Open
3 tasks done

Comments

@rukapse
Copy link

rukapse commented Nov 7, 2024

Prerequisites

  • Have you tested the operation in the API directly?
  • Do you have the latest SDK version?
  • Review the compatibility matrix before opening an issue.

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

  • Ideally it should delete all the VLANs and SSIDs mapped to VLANs in the Catalyst Center.

Screenshots
image

Environment (please complete the following information):

  • Cisco DNA Center Version and patch: 2.3.7.6-75360
  • Python version: 3.9.0
  • SDK version: 2.9.3
  • OS Version: macOS 15.1 (24B83)

Additional context
Add any other context about the problem here.

@JosePabloOcampo1212
Copy link
Collaborator

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

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.

@rukapse
Copy link
Author

rukapse commented Nov 8, 2024 via email

@JosePabloOcampo1212
Copy link
Collaborator

Was your problem resolved?

@rukapse
Copy link
Author

rukapse commented Nov 14, 2024 via email

@rukapse
Copy link
Author

rukapse commented Nov 20, 2024

Hello, is there any update on this?

@JosePabloOcampo1212
Copy link
Collaborator

I'm currently reviewing the problem.

@rukapse
Copy link
Author

rukapse commented Nov 30, 2024

Hello, following up to check if there is an update on this issue?

@rukapse
Copy link
Author

rukapse commented Dec 10, 2024 via email

@DNACENSolutions
Copy link
Collaborator

[] is a valid payload as per API. Where is no VLAN to map. the payload is empty. or when all configs to be cleaned up, payload should be []. APIs takes this payload.

@JosePabloOcampo1212
Copy link
Collaborator

Add new SSIDs to a VLAN

When you add new SSIDs to a VLAN that already has SSIDs mapped, the payload must include the new SSIDs in the ssidDetails field.

Captura de pantalla 2025-01-03 a las 7 14 05 p  m

Update the security group of an existing SSID

If you already have an SSID mapped to a VLAN and want to update its securityGroupTag, you can do so by sending the same SSID with a new value for securityGroupTag.

Captura de pantalla 2025-01-03 a las 7 16 17 p  m

Remove an SSID from the VLAN

If you want to remove an SSID previously mapped to a VLAN, simply do not include it in the payload. Any SSID not present in the request will be automatically removed from the VLAN.

before removal

Captura de pantalla 2025-01-03 a las 7 18 17 p  m

after deletion (removing SSID_Existing_1)

Captura de pantalla 2025-01-03 a las 7 18 59 p  m

Clear all SSIDs in a VLAN

If you want to remove all SSIDs mapped to a VLAN, you can simply send an empty payload in the ssidDetails field for that VLAN.

Captura de pantalla 2025-01-03 a las 7 21 09 p  m

Add an SSID to an existing VLAN and remove others

If you want to add a new SSID to the VLAN but remove the previously mapped SSIDs (except the new one), you only need to include the new SSID in the payload. Previous SSIDs not included will be removed.

Captura de pantalla 2025-01-03 a las 7 22 43 p  m

Add a new SSID and keep existing SSIDs.

If you want to add a new SSID without removing existing SSIDs, you must include all current SSIDs in the payload in addition to the new SSID you want to add.

Captura de pantalla 2025-01-03 a las 7 24 08 p  m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants