Anons79 Mini Shell

Directory : /proc/self/root/lib/python2.7/site-packages/ansible/module_utils/
Upload File :
Current File : //proc/self/root/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pyc

�
�Udac@s�yddlZeZWnek
r/eZnXddlmZd�Zd�Zdd�Z	d�Z
d�Zd	�Zed
�Z
ddlmZmZddlmZyZdd
lmZddlmZdd
lmZdd
lmZddlmZeZWnek
reZnXddlm Z ddl!m"Z"m#Z#ddl$m%Z%m&Z&ddl'm(Z(ddl)m*Z*e+de+dddededgf�de+dddededgf�de+ddddd gded!eded"gf�d#e+d$d%dd&ded'gf�d(e+dd)d$dded*gf�d+e+ddd$d,d-d,d.g�d/e+ddd$d0ded1gf��Z,d2e-fd3��YZ.d4e-fd5��YZ/d6e0fd7��YZ1dS(8i����N(tenv_fallbackcCstdtdddtdtdgf�dtdddtdtdgf�d	tddd
ddgdtd
tdtdgf�dtdddddtdgf�dtdddddtdgf�dtdddddddg�dtdddddtdgf��S(Ntserverttypetstrtrequiredtfallbackt	F5_SERVERtusertF5_USERtpasswordtaliasestpasstpwdtno_logtF5_PASSWORDtvalidate_certstdefaulttyestbooltF5_VALIDATE_CERTStserver_porttinti�tF5_SERVER_PORTtstatetpresenttchoicestabsentt	partitiontCommontF5_PARTITION(tdicttTrueR(((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pytf5_argument_spec s>cCs�ts|jdd�n|jdrWddl}t|d�sW|jdd�qWn|jd|jd|jd	|jd
|jd|jd|jdfS(
Ntmsgs%the python bigsuds module is requiredRi����t
SSLContexts�bigsuds does not support verifying certificates with python < 2.7.9.Either update python or set validate_certs=False on the task'RRR	RRR(t
bigsuds_foundt	fail_jsontparamstsslthasattr(tmoduleR&((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pytf5_parse_argumentsJs
	






i�cCsy�tjdkr?tjd|d|d|d|d|�}nTtjdkrutjd|d|d|d|�}ntjd|d|d|�}Wn�tk
r|r�tjd|d|d|�}qddl}t|d	�r�|j|_ntjd|d|d|�}nX|S(
Ns1.0.4thostnametusernameR	tverifytports1.0.3i����R"(tbigsudst__version__tBIGIPt	TypeErrorR&R't_create_unverified_contextt_create_default_https_context(tbigipRR	RR-tapiR&((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pyt	bigip_api`s-'"
!"cCs.|dk	r*|jd�r*d||fS|S(Nt/s/%s/%s(tNonet
startswith(Rtname((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pytfq_name|scs&|dkrdSt�fd�|�S(Ncs
t�|�S(N(R;(tx(R(sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pyt<lambda>�s(R8tmap(Rt
list_names((RsA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pyt
fq_list_names�scCsCitdt�d6t�d6t�d6}t||�}||�S(Ntkeytcommandtprompttanswer(RRtComplexList(R(tcommandstspect	transform((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pytto_commands�s

cCs�t�}t|t|��}x�|D]}}|j|�}t||�\}}}|r�|dkr�|jdt|dd�d|�n|jt|dd��q%W|S(NiR!terrorstsurrogate_then_replacetrc(tlistRItto_listtjsonifytexec_commandR$tto_texttappend(R(RFtcheck_rct	responsestcmdRLtoutterr((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pytrun_commands�s	
%(tABCMetatabstractproperty(tdefaultdict(tManagementRoot(tTransactionContextManager(tiControlUnexpectedHTTPError(t
AnsibleModule(t	iteritemstwith_metaclass(RNRE(RP(RQRRRRRRRRR	R
RRR
RRRRRRRRRRRRRRRRtAnsibleF5ClientcBsSeZdeddddedeed�
Zd�Zd�Zd�Zd�ZRS(R4cCsX||_t�}|jt�|r5|j|�n|	rE|d=n|
rU|d=n||_g}|rw||7}ng}
|r�|
|7}
ntd|d|d|d|
d|d|d	|�|_|jj|_|j�|_	d
|jj
ks|jj
d
dkrTy|j||j	�|_WqTt
k
rP}|jt|��qTXndS(NRRt
argument_spectsupports_check_modetmutually_exclusivetrequired_togethertrequired_iftrequired_one_oftadd_file_common_argst	transporttcli(tf5_product_nameRtupdatetF5_COMMON_ARGStarg_specR_R(t
check_modet_get_connect_paramst_connect_paramsR%t_get_mgmt_rootR5R^tfailR(tselfRcRdReRfRgRhRiRlt
sans_statetsans_partitiontmerged_arg_spectmutually_exclusive_paramstrequired_together_paramstexc((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pyt__init__�s@		


	

(cCs|jjd|�dS(NR!(R(R$(RuR!((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pyRtscCs]td|jjdd|jjdd|jjdd|jjdd|jjd�}|S(NRR	RRR(RR(R%(RuR%((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pyRqscKs�|dkr8t|d|d|dd|ddd�S|d	krpt|d|d|dd|ddd
�S|dkr�t|d|d|dd|ddd
�SdS(
NR4RRR	R-Rttokenttmost	iworkflowtlocaltbigiqt
auth_provider(t	BigIpMgmtt
iWorkflowMgmtt	BigIqMgmt(RuRtkwargs((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pyRss*





cCs|j|j|j�|_dS(sAttempts to reconnect to a device

        The existing token from a ManagementRoot can become invalid if you,
        for example, upgrade the device (such as is done in the *_software
        module.

        This method can be used to reconnect to a remote device without
        having to re-instantiate the ArgumentSpec and AnsibleF5Client classes
        it will use the same values that were initially provided to those
        classes

        :return:
        :raises iControlUnexpectedHTTPError
        N(RsRlRrR5(Ru((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pyt	reconnect7sN(	t__name__t
__module__R8tFalseR|RtRqRsR�(((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pyRb�s	+		
	tAnsibleF5ParameterscBsSeZdd�Zdd�Zd�Zed��Zejd��Zd�Z	RS(cCs<td��|_g|jd<|r8|jd|�ndS(NcSsdS(N(R8(((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pyR=Mst
__warningsR%(R[t_valuesRm(RuR%((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pyR|Ls
cCs�|r�x�t|�D]�\}}|jdk	rV||jkrV|j}|j|}n|j}|}tt|�|d�}t|t�r�|jdkr�||j|<q�t	|||�q||j|<qWndS(N(
R`tapi_mapR8R�tgetattrRt
isinstancetpropertytfsettsetattr(RuR%tktvtdict_to_usetmap_keyt
class_attr((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pyRmRs		cCs|j|S(N(R�(Rutitem((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pyt__getattr__kscCs+|jddkrdS|jdjd�S(NRRR7(R�R8tstrip(Ru((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pyRpscCs||jd<dS(NR(R�(Rutvalue((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pyRvscCstd�t|�D��S(Ncss-|]#\}}|dk	r||fVqdS(N(R8(t.0R�R�((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pys	<genexpr>{s(RR`(RuR%((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pyt_filter_paramszsN(
R�R�R8R|RmR�R�RtsetterR�(((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pyR�Ks	t
F5ModuleErrorcBseZRS((R�R�(((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pyR�~s(2R.RR#tImportErrorR�tansible.module_utils.basicRR R)R6R;R@RIRXtabcRYRZtcollectionsR[tf5.bigipR\R�tf5.bigip.contextsR]tBigIpTxContexttf5.bigiqR�tf5.iworkflowR�ticontrol.exceptionsR^t	HAS_F5SDKR_tansible.module_utils.sixR`Rat)ansible.module_utils.network.common.utilsRNREtansible.module_utils.connectionRPtansible.module_utils._textRQRRntobjectRbR�t	ExceptionR�(((sA/usr/lib/python2.7/site-packages/ansible/module_utils/f5_utils.pyt<module>s|


	*				



j3

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