mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Bug Fixes for ontap_user.py (#44222)
This commit is contained in:
parent
6d97765688
commit
374a22f4c7
1 changed files with 7 additions and 3 deletions
|
@ -20,7 +20,7 @@ short_description: useradmin configuration and management
|
|||
extends_documentation_fragment:
|
||||
- netapp.na_ontap
|
||||
version_added: '2.6'
|
||||
author: Sumit Kumar (sumit4@netapp.com)
|
||||
author: NetApp Ansible Team (ng-ansibleteam@netapp.com)
|
||||
|
||||
description:
|
||||
- Create or destroy users.
|
||||
|
@ -42,7 +42,7 @@ options:
|
|||
description:
|
||||
- Application to grant access to.
|
||||
required: true
|
||||
choices: ['console', 'http','ontapi','rsh','snmp','sp','ssh','telnet']
|
||||
choices: ['console', 'http','ontapi','rsh','snmp','service-processor','sp','ssh','telnet']
|
||||
|
||||
authentication_method:
|
||||
description:
|
||||
|
@ -127,7 +127,7 @@ class NetAppOntapUser(object):
|
|||
|
||||
application=dict(required=True, type='str', choices=[
|
||||
'console', 'http', 'ontapi', 'rsh',
|
||||
'snmp', 'sp', 'ssh', 'telnet']),
|
||||
'snmp', 'sp', 'service-processor', 'ssh', 'telnet']),
|
||||
authentication_method=dict(required=True, type='str',
|
||||
choices=['community', 'password',
|
||||
'publickey', 'domain',
|
||||
|
@ -199,6 +199,9 @@ class NetAppOntapUser(object):
|
|||
# Error 16034 denotes a user not being found.
|
||||
if to_native(error.code) == "16034":
|
||||
return False
|
||||
# Error 16043 denotes the user existing, but the application missing
|
||||
elif to_native(error.code) == "16043":
|
||||
return False
|
||||
else:
|
||||
self.module.fail_json(msg='Error getting user %s: %s' % (self.name, to_native(error)),
|
||||
exception=traceback.format_exc())
|
||||
|
@ -293,6 +296,7 @@ class NetAppOntapUser(object):
|
|||
else:
|
||||
self.module.fail_json(msg='Error unlocking user %s: %s' % (self.name, to_native(error)),
|
||||
exception=traceback.format_exc())
|
||||
return True
|
||||
|
||||
def delete_user(self):
|
||||
user_delete = netapp_utils.zapi.NaElement.create_node_with_children(
|
||||
|
|
Loading…
Add table
Reference in a new issue