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

AP port assignment API not working with DNAC APIs of 2.3.3.0 #126

Closed
ragadegithub opened this issue Sep 15, 2023 · 4 comments
Closed

AP port assignment API not working with DNAC APIs of 2.3.3.0 #126

ragadegithub opened this issue Sep 15, 2023 · 4 comments
Labels
in-progress Team is working to solve issue.

Comments

@ragadegithub
Copy link

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.

Yes all Prereqs met
Describe the bug
API for AP port assignment fails with below error even when the payload has all the right information.
The exact same payload works with Requests / Postman API call.

ERROR :: - {'siteNameHierarchy': 'Real/stie/hierarcy', 'deviceManagementIpAddress': '10.10.10.140', 'interfaceName': 'GigabitEthernet3/0/7', 'dataIpAddressPoolName': 'POOLNAME', 'authenticateTemplateName': 'Closed Authentication', 'interfaceDescription': 'ACCESS-POINT'} is invalid. Reason: data.authenticateTemplateName must be one of ['No Authentication', 'Open Authentication', 'Closed Authentication ', 'Low Impact']

Expected behavior
The payload is correct and the API must have executed.

Screenshots
Please provide an screenshot of the successful API call with cuRL, Postman, etc.

Environment (please complete the following information):

  • Cisco DNA Center Version and patch: 2.3.3.7
  • Python version: 3.10
  • SDK version: 2.6.7
  • OS Version: Windows

Additional context

checking through the payload validation section of SDK code, there seems to be an extra space in the below file:
This could be potential cause.
code works as expected if validation is set to "False"
file :
dnacentersdk/models/validators/v2_3_3_0/jsd_e4a09bf566f35babad9e27f5eb61a86d.py

line 47:

            "enum": [
            "No Authentication",
            "Open Authentication",
            "Closed Authentication ",    <<<< extra space.
            "Low Impact"
            ],
@ragadegithub ragadegithub changed the title AP port assignment API not working AP port assignment API not working with DNAC APIs of 2.3.3.0 Sep 15, 2023
@zapodeanu
Copy link
Collaborator

@ragadegithub The extra space comes from the API documentation. The SDK validates against the allowed values for the Auth Template Name

@ragadegithub
Copy link
Author

@zapodeanu , the API call using POSTMAN works without that Extra space.
In this case, i believe there has to be a documentation bug for the API :)

at this point, the only way i could get the script working is by setting the "active_validation" to false.

is it possible to update the SDK before the API documentation process?

@zapodeanu
Copy link
Collaborator

@ragadegithub Maybe the API works with both the extra space and without the extra space. However, the libraries are developed using the API documentation, which includes the extra space.
@fmunozmiranda Could this fix be added to one library releases with bug fixes? Thank you

@fmunozmiranda fmunozmiranda added the in-progress Team is working to solve issue. label Sep 20, 2023
fmunozmiranda pushed a commit that referenced this issue Sep 20, 2023
### Changed
-  AP port assignment API not working with DNAC APIs of 2.3.3.0 #126, Documetion bug, extra-space in enum.
@fmunozmiranda
Copy link
Collaborator

Fixed in v2.6.9. Closing the issue, if there is other problem related to this, please re-open it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-progress Team is working to solve issue.
Projects
None yet
Development

No branches or pull requests

3 participants