Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/storage/netapp/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/storage/netapp/netapp_e_global.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
Z
ddlZddlm
Z
dd
lmZmZddlmZidd6dd6Zdefd��YZd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys
---
module: netapp_e_global
short_description: NetApp E-Series manage global settings configuration
description:
    - Allow the user to configure several of the global settings associated with an E-Series storage-system
version_added: '2.7'
author: Michael Price (@lmprice)
extends_documentation_fragment:
    - netapp.eseries
options:
    name:
        description:
            - Set the name of the E-Series storage-system
            - This label/name doesn't have to be unique.
            - May be up to 30 characters in length.
        aliases:
            - label
    log_path:
        description:
            - A local path to a file to be used for debug logging
        required: no
notes:
    - Check mode is supported.
    - This module requires Web Services API v1.3 or newer.
s�
    - name: Set the storage-system name
      netapp_e_global:
        name: myArrayName
        api_url: "10.1.1.1:8443"
        api_username: "admin"
        api_password: "myPass"
s
msg:
    description: Success message
    returned: on success
    type: str
    sample: The settings have been updated.
name:
    description:
        - The current name/label of the storage-system.
    returned: on success
    sample: myArrayName
    type: str
N(t
AnsibleModule(trequestteseries_host_argument_spec(t	to_nativesapplication/jsonsContent-TypetAccepttGlobalSettingscB`s5eZd�Zd�Zd�Zd�Zd�ZRS(c
C`s|t�}|jtdtdddtddg�dtdddt���td|d	t�|_|jj}|d|_|d
|_	|d|_
td|d
d|dd|d�|_|jj|_|d}t
j|jj�|_|r t
jdt
jd|dddd�n|j
jd�sD|j
d7_
n|jrxt|j�dkrx|jjdd�ndS(Ntnamettypetstrtrequiredtaliasestlabeltlog_patht
argument_spectsupports_check_modetssidtapi_urlturl_passwordtapi_passwordtvalidate_certsturl_usernametapi_usernametleveltfilenametfilemodetwtformatsS%(relativeCreated)dms %(levelname)s %(module)s.%(funcName)s:%(lineno)d
 %(message)st/itmsgsCThe provided name is invalid, it must be < 30 characters in length.(R
tupdatetdicttFalseRtTruetmoduletparamsRRturltcredst
check_modetloggingt	getLoggert	__class__t__name__t_loggertbasicConfigtDEBUGtendswithtlent	fail_json(tselfRtargsR((sR/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/netapp_e_global.pyt__init__Ms.	




	
cC`s�yet|jd|jdt|j�\}}|dd
kr\|jjdd|j�n|dSWn9tk
r�}|jjdd	|jt|�f�nXdS(Nsstorage-systems/%stheadersRtofflinetneverContactedR$s.This storage-system is offline! Array Id [%s].Rs.Connection failure! Array Id [%s]. Error [%s].(R<R=(	R	R+RtHEADERSR,R)R7t	ExceptionR(R8trctresultterr((sR/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/netapp_e_global.pytget_nameps,c
C`s�|j�}t}|j|kr*t}ntd|j�}|r�|jr�y\t|jd|jdddt	j
|�dt|j�\}}|j
jd|d�Wq�tk
r�}|jjdd	|jt|�f�q�Xn|S(
NRs storage-systems/%s/configurationtmethodtPOSTtdataR;sSet name to %s.R$sDWe failed to set the storage-system name! Array Id [%s]. Error [%s].(RCR'RR(R&R-R	R+RtjsontdumpsR>R,R2tinfoR?R)R7R(R8RR%tbodyR@RARB((sR/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/netapp_e_global.pytupdate_nameys	$cC`s;|j�}|j�}|jjddd|d|�dS(NR$s)The requested settings have been updated.tchangedR(RKRCR)t	exit_json(R8R%R((sR/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/netapp_e_global.pyR%�scO`s|j�dS(N(R%(R8R9tkwargs((sR/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/netapp_e_global.pyt__call__�s(R1t
__module__R:RCRKR%RO(((sR/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/netapp_e_global.pyR
Ls
	#				cC`st�}|�dS(N(R
(tsettings((sR/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/netapp_e_global.pytmain�s	t__main__(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNRGR.tansible.module_utils.basicRtansible.module_utils.netappR	R
tansible.module_utils._textRR>tobjectR
RRR1(((sR/usr/lib/python2.7/site-packages/ansible/modules/storage/netapp/netapp_e_global.pyt<module>s&


	
K	

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]