You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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_serversvars_files:
- vars.ymlconnection: localgather_facts: notasks:
- 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: presentpayload:
- 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.
The text was updated successfully, but these errors were encountered:
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.
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:
The text was updated successfully, but these errors were encountered: