From 18bd2207b6c1977e99a93673a7be099e23f0f547 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 26 Jun 2024 08:22:20 +0200 Subject: Merging upstream version 10.1.0+dfsg. Signed-off-by: Daniel Baumann --- .../cisco/dnac/plugins/modules/user.py | 35 ++++++++++++++++------ 1 file changed, 26 insertions(+), 9 deletions(-) (limited to 'ansible_collections/cisco/dnac/plugins/modules/user.py') diff --git a/ansible_collections/cisco/dnac/plugins/modules/user.py b/ansible_collections/cisco/dnac/plugins/modules/user.py index 4567de33d..230211eec 100644 --- a/ansible_collections/cisco/dnac/plugins/modules/user.py +++ b/ansible_collections/cisco/dnac/plugins/modules/user.py @@ -9,10 +9,11 @@ DOCUMENTATION = r""" module: user short_description: Resource module for User description: -- Manage operations create and update of the resource User. -- Add a new user for Cisco DNA Center system. -- Update a user for Cisco DNA Center system. -version_added: '6.7.0' +- Manage operations create, update and delete of the resource User. +- Add a new user for Cisco DNA Center System. +- Delete a user from Cisco DNA Center System. +- Update a user for Cisco DNA Center System. +version_added: '3.1.0' extends_documentation_fragment: - cisco.dnac.module author: Rafael Campos (@racampos) @@ -40,22 +41,27 @@ options: description: Username. type: str requirements: -- dnacentersdk >= 2.6.0 -- python >= 3.9 +- dnacentersdk >= 2.7.1 +- python >= 3.5 seealso: - name: Cisco DNA Center documentation for User and Roles AddUserAPI description: Complete reference of the AddUserAPI API. link: https://developer.cisco.com/docs/dna-center/#!add-user-api +- name: Cisco DNA Center documentation for User and Roles DeleteUserAPI + description: Complete reference of the DeleteUserAPI API. + link: https://developer.cisco.com/docs/dna-center/#!delete-user-api - name: Cisco DNA Center documentation for User and Roles UpdateUserAPI description: Complete reference of the UpdateUserAPI API. link: https://developer.cisco.com/docs/dna-center/#!update-user-api notes: - SDK Method used are - user_and_roles.UserandRoles.add_user_ap_i, - user_and_roles.UserandRoles.update_user_ap_i, + userand_roles.UserandRoles.add_user_api, + userand_roles.UserandRoles.delete_user_api, + userand_roles.UserandRoles.update_user_api, - Paths used are post /dna/system/api/v1/user, + delete /dna/system/api/v1/user/{userId}, put /dna/system/api/v1/user, """ @@ -97,8 +103,19 @@ EXAMPLES = r""" userId: string username: string -""" +- name: Delete by id + cisco.dnac.user: + 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: absent + userId: string +""" RETURN = r""" dnac_response: description: A dictionary or list with the response returned by the Cisco DNAC Python SDK -- cgit v1.2.3