�
�Udac @` s� d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
Z
d d l m Z d d
l
m Z d d l j j Z d d l m Z e j � Z d e f d � � YZ d � Z e d k r� e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust certifiedt supported_bys�
module: na_elementsw_admin_users
short_description: NetApp Element Software Manage Admin Users
extends_documentation_fragment:
- netapp.solidfire
version_added: '2.7'
author: NetApp Ansible Team (@carchi8py) <[email protected]>
description:
- Create, destroy, or update admin users on SolidFire
options:
state:
description:
- Whether the specified account should exist or not.
required: true
choices: ['present', 'absent']
element_username:
description:
- Unique username for this account. (May be 1 to 64 characters in length).
required: true
element_password:
description:
- The password for the new admin account. Setting the password attribute will always reset your password, even if the password is the same
acceptEula:
description:
- Boolean, true for accepting Eula, False Eula
type: bool
access:
description:
- A list of type the admin has access to
s�
- name: Add admin user
na_elementsw_admin_users:
state: present
username: "{{ admin_user_name }}"
password: "{{ admin_password }}"
hostname: "{{ hostname }}"
element_username: carchi8py
element_password: carchi8py
acceptEula: True
access: accounts,drives
- name: modify admin user
na_elementsw_admin_users:
state: present
username: "{{ admin_user_name }}"
password: "{{ admin_password }}"
hostname: "{{ hostname }}"
element_username: carchi8py
element_password: carchi8py12
acceptEula: True
access: accounts,drives,nodes
- name: delete admin user
na_elementsw_admin_users:
state: absent
username: "{{ admin_user_name }}"
password: "{{ admin_password }}"
hostname: "{{ hostname }}"
element_username: carchi8py
s
N( t
AnsibleModule( t to_native( t NaElementSWModulet NetAppElementSWAdminUserc B` sM e Z d Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z RS( sF
Class to set, modify and delete admin users on ElementSW box
c C` sg t j � | _ | j j t d t d t d d d g � d t d t d d � d t d t d d d
t � d t d t d d � d
t d t d d � � � t d | j d t � | _ | j j } | d | _
| d | _ | d | _ | d | _
| d
| _ t t k r!| j j d d � n t j d | j � | _ t | j � | _ | j j d d � | _ d S( s@
Initialize the NetAppElementSWAdminUser class.
t statet requiredt choicest presentt absentt element_usernamet typet strt element_passwordt no_logt
acceptEulat boolt accesst listt
argument_spect supports_check_modet msgs) Unable to import the SolidFire Python SDKt modulet sourcet na_elementsw_admin_usersN( t netapp_utilst ontap_sf_host_argument_specR t updatet dictt Truet FalseR R t paramsR R R R R t
HAS_SF_SDKt fail_jsont create_sf_connectiont sfeR
t elementsw_helpert set_element_attributest
attributes( t selft param( ( s[ /usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/na_elementsw_admin_users.pyt __init__j s*
c C` s= | j j � } x'