Anons79 Mini Shell

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

�
�Udac@s�ddlZddlZddlmZddlmZddlmZmZddl	m
Z
mZddlmZiZ
d�Zd�Zd	�Zd
�Zd�Zdd�Zd
�Zd�Zed�Zd�ZdS(i����N(tdeepcopy(tto_text(tto_listtComplexList(t
ConnectiontConnectionError(tremove_default_specc	Gs�t|�}x!|D]}tdt�||<qWt|�tdtddddd|��}|j|�x|D]}|j|�qrW|S(Ntrequiredt	aggregatettypetlisttelementstdicttoptions(RRtTrueRtupdate(telement_specRt
extra_spectaggregate_specteltt
argument_spec((sV/usr/lib/python2.7/site-packages/ansible/module_utils/network/edgeswitch/edgeswitch.pytbuild_aggregate_spec)s



cCs�g}|jjd�}|r�xt|D]Y}x7|D]/}|j|�dkr2|j|||<q2q2W|j�}|j|�q%Wn|j|j�|S(NR(tparamstgettNonetcopytappend(tmoduletobjRtitemtkeytd((sV/usr/lib/python2.7/site-packages/ansible/module_utils/network/edgeswitch/edgeswitch.pytmap_params_to_obj7s

cCsmt|d�r|jSt|�}|jd�}|dkrRt|j�|_n|jdd|�|jS(Nt_edgeswitch_connectiontnetwork_apitcliconftmsgsInvalid connection type %s(thasattrR!tget_capabilitiesRRt_socket_patht	fail_json(RtcapabilitiesR"((sV/usr/lib/python2.7/site-packages/ansible/module_utils/network/edgeswitch/edgeswitch.pytget_connectionHscCszt|d�r|jSyt|j�j�}Wn/tk
r`}|jdt|dd��nXtj	|�|_|jS(Nt_edgeswitch_capabilitiesR$terrorstsurrogate_then_replace(
R%R+RR'R&RR(Rtjsontloads(RR)texc((sV/usr/lib/python2.7/site-packages/ansible/module_utils/network/edgeswitch/edgeswitch.pyR&Vs cCsdt|�}y|j�}Wn/tk
rM}|jdt|dd��nXt|dd�j�S(NR$R,R-(R*tget_defaults_flagRR(Rtstrip(Rt
connectiontoutR0((sV/usr/lib/python2.7/site-packages/ansible/module_utils/network/edgeswitch/edgeswitch.pyR1as cCs�djt|��}yt|SWn�tk
r�t|�}y|jd|�}Wn/tk
r�}|jdt|dd��nXt|dd�j	�}|t|<|SXdS(Nt tflagsR$R,R-(
tjoinRt_DEVICE_CONFIGStKeyErrorR*t
get_configRR(RR2(RR6tflag_strR3R4R0tcfg((sV/usr/lib/python2.7/site-packages/ansible/module_utils/network/edgeswitch/edgeswitch.pyR:js
 
cCs�t|�}|jd�}i}d}x�|D]y}|dkr`|r�|||d<d}q�q.|rv|j|�q.tjd|�}|r.t�}|j|�q.q.W|S(Ns
texitis^interface (.*)$(R:tsplitRRtretmatchR
(Rtconfigtlinest
interfacest	interfacetlineR@((sV/usr/lib/python2.7/site-packages/ansible/module_utils/network/edgeswitch/edgeswitch.pytget_interfaces_configzs 
	cCsCitdt�d6t�d6t�d6}t||�}||�S(NRtcommandtprompttanswer(RRR(Rtcommandstspect	transform((sV/usr/lib/python2.7/site-packages/ansible/module_utils/network/edgeswitch/edgeswitch.pytto_commands�s

cCsVt|�}y|jd|d|�SWn)tk
rQ}|jdt|��nXdS(NRJtcheck_rcR$(R*trun_commandsRR(R(RRJRNR3R0((sV/usr/lib/python2.7/site-packages/ansible/module_utils/network/edgeswitch/edgeswitch.pyRO�s
cCs\t|�}y |j|�}|jd�SWn)tk
rW}|jdt|��nXdS(NtresponseR$(R*tedit_configRRR(R(RRJR3trespR0((sV/usr/lib/python2.7/site-packages/ansible/module_utils/network/edgeswitch/edgeswitch.pytload_config�s(R.R?RRtansible.module_utils._textRt)ansible.module_utils.network.common.utilsRRtansible.module_utils.connectionRRRR8RR R*R&R1RR:RFRMRRORS(((sV/usr/lib/python2.7/site-packages/ansible/module_utils/network/edgeswitch/edgeswitch.pyt<module>s"								


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