|
|
|
@ -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(
|
|
|
|
|