Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/module_utils/network/enos/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/module_utils/network/enos/enos.pyo

�
�Udac@s�ddlmZddlmZddlmZmZddlmZm	Z	ddlm
Z
iZd*a
i
e�d6edd�d	6ed
edgf�d6ed
ed
gfde�d6ed
edgfdd�d6ed
edgfdd�d6ed
edgfde�d6edd�d6e�d6e�d6Zieddde�d6Ziede�d6e�d 6e�d!6Zd"�Zd#�Zd$�Zd*d%�Zd&�Zed'�Zd(�Zd)�Zd*S(+i����(tto_text(tenv_fallback(tto_listtEntityCollection(t
Connectiontexec_command(tConnectionErrorthostttypetinttporttfallbacktANSIBLE_NET_USERNAMEtusernametANSIBLE_NET_PASSWORDtno_logtpasswordtANSIBLE_NET_SSH_KEYFILEtpathtssh_keyfiletANSIBLE_NET_AUTHORIZEtboolt	authorizetANSIBLE_NET_AUTH_PASSt	auth_passttimeouttcontextt	passwordstdicttoptionstprovidertkeytcommandtprompttanswercCstS(N(tenos_provider_spec(((sJ/usr/lib/python2.7/site-packages/ansible/module_utils/network/enos/enos.pytget_provider_argspecCscCsdS(N((tmoduletwarnings((sJ/usr/lib/python2.7/site-packages/ansible/module_utils/network/enos/enos.pyt
check_argsGscCs�tr
tSt|j�ad}y|jd}Wntk
rId}nX|r|dkred}n
d|}tj|�ntS(NRtsystemschangeto systemschangeto context %s(t_CONNECTIONRt_socket_pathtNonetparamstKeyErrortget(R%RR ((sJ/usr/lib/python2.7/site-packages/ansible/module_utils/network/enos/enos.pytget_connectionKs

	
cCs�|dkrgn|}d}y|jd}Wntk
rHd}nX|rXd}n%d}|dj|�7}|j�}yt|SWnOtk
r�t|�}|j|�}t|dd�j�}|t|<|SXdS(NRsmore system:running-configsshow running-config t terrorstsurrogate_then_replace(	R+R,R-tjointstript_DEVICE_CONFIGSR/R.R(R%tflagsRtcmdtconntouttcfg((sJ/usr/lib/python2.7/site-packages/ansible/module_utils/network/enos/enos.pyt
get_configas&

	

cCs�t|t�std��nt|t�}||�}xOt|�D]A\}}|jrF|djd�rF|jd|d�qFqFW|S(Nsargument must be of type <list>R tshowsJonly show commands are supported when using check mode, not executing `%s`(	t
isinstancetlisttAssertionErrorRtcommand_spect	enumeratet
check_modet
startswithtwarn(R%tcommandst	transformtindextitem((sJ/usr/lib/python2.7/site-packages/ansible/module_utils/network/enos/enos.pytto_commandszs	cCsgt|�}t|t|��}t�}x6|D].}|j|�}|jt|dd��q1W|S(NR1R2(R/RIRR>R.tappendR(R%REtcheck_rct
connectiont	responsesR7R9((sJ/usr/lib/python2.7/site-packages/ansible/module_utils/network/enos/enos.pytrun_commands�s	
cCsZy*t|�}|jd�|j|�Wn)tk
rU}|jdt|��nXdS(Ntenabletmsg(R/R.tedit_configRt	fail_jsonR(R%tconfigR8texc((sJ/usr/lib/python2.7/site-packages/ansible/module_utils/network/enos/enos.pytload_config�s
cCs�t|d�\}}}t|dd�}t�}x:|j�D],}|r@|j|j�j�d�q@q@Wd|kr�dSdSdS(Nsshow running-config ?R1R2italltfull(RRtsett
splitlinestaddR4tsplit(R%trcR9terrREtline((sJ/usr/lib/python2.7/site-packages/ansible/module_utils/network/enos/enos.pytget_defaults_flag�s	$N(tansible.module_utils._textRtansible.module_utils.basicRt)ansible.module_utils.network.common.utilsRRtansible.module_utils.connectionRRRR5R+R)RtTrueR#tenos_argument_specR@R$R'R/R;RIRNRUR_(((sJ/usr/lib/python2.7/site-packages/ansible/module_utils/network/enos/enos.pyt<module>"s>




						

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