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

Bug within cisco.dnac.sda_fabric_authentication_profile #79

Closed
jianm12007 opened this issue Nov 3, 2022 · 2 comments
Closed

Bug within cisco.dnac.sda_fabric_authentication_profile #79

jianm12007 opened this issue Nov 3, 2022 · 2 comments
Labels
bug Something isn't working in-progress Team is working to solve issue.

Comments

@jianm12007
Copy link

I try to use cisco.dnac.sda_fabric_authentication_profile to assign authentication to SDA fabrics, but error messages appears as below:

TASK [Assign default authentication profile to fabric sites.] ******************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: dnacentersdk.exceptions.MalformedRequest: [{'siteNameHierarchy': 'Global/Shanghai/SHA-17/SH_Floor_1', 'authenticateTemplateName': 'No Authentication'}] is invalid. Reason: data[0].authenticateTemplateName must be one of ['No Authentication ', 'Open Authentication', 'Closed Authentication', 'Low Impact']
failed: [10.100.0.1] (item={'name': 'SH_Floor_1', 'length': 100, 'width': 100, 'height': 10, 'rfModel': 'Cubes And Walled Offices', 'parentName': 'Global/Shanghai/SHA-17', 'AuthProfile': 'No Authentication'}) => {"ansible_loop_var": "item", "item": {"AuthProfile": "No Authentication", "height": 10, "length": 100, "name": "SH_Floor_1", "parentName": "Global/Shanghai/SHA-17", "rfModel": "Cubes And Walled Offices", "width": 100}, "msg": "An error occured when executing operation. The error was: [{'siteNameHierarchy': 'Global/Shanghai/SHA-17/SH_Floor_1', 'authenticateTemplateName': 'No Authentication'}] is invalid. Reason: data[0].authenticateTemplateName must be one of ['No Authentication ', 'Open Authentication', 'Closed Authentication', 'Low Impact']"}

=================================================================================================
The playbook is as below:

---
# Assign default authentication profile to fabric sites.
- hosts: dnac_servers
  vars_files:
    - vars.yml
  connection: local
  gather_facts: no

  tasks:
  - name: Assign default authentication profile to fabric sites.
    cisco.dnac.sda_fabric_authentication_profile:
      dnac_host: "{{dnac_host}}"
      dnac_username: "{{dnac_username}}"
      dnac_password: "{{dnac_password}}"
      dnac_verify: "{{dnac_verify}}"
      dnac_port: "{{dnac_port}}"
      dnac_version: "{{dnac_version}}"
      dnac_debug: "{{dnac_debug}}"
      state: present
      payload:
      - siteNameHierarchy: "Global/Shanghai/SHA-17/SH_Floor_1"
        authenticateTemplateName: "`No Authentication`"

===============================================================================================
From the error message below, the error reason is the expected input value of authenticateTemplateName is 'No Authentication '. Why there is a space at the end of the value.

'authenticateTemplateName': 'No Authentication'}] is invalid. Reason: data[0].authenticateTemplateName must be one of ['No Authentication ', 'Open Authentication', 'Closed Authentication', 'Low Impact']"}


Please verify and fix the issue.
@bvargasre bvargasre added bug Something isn't working in-progress Team is working to solve issue. labels Nov 22, 2022
@bvargasre
Copy link
Collaborator

Hi @jianm12007 , thanks for reporting the bug.
New versions of dnacentersdk 2.5.5 and dnacenter ansible 6.6.1 are available. Feel free to test it and close or comment if necessary.

@jianm12007
Copy link
Author

Please feel free to close issue. It is fixed.

syed-khadeerahmed pushed a commit to syed-khadeerahmed/dnacenter-ansible that referenced this issue Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in-progress Team is working to solve issue.
Projects
None yet
Development

No branches or pull requests

2 participants