Anons79 Mini Shell

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

�
�Udac@s�ddlZddlmZddlmZddlmZmZddlm	Z	ddl
mZmZm
Z
iZddd	gZie�d
6edd�d
6ededgf�d6ededgfde�d6ededgfdd�d6ededgfdd�d6ededgfde�d6edd�d6Zieddde�d6Zied d!�d
6ed d!dd�d
6ed d!�d6ed d!de�d6ed d!dd�d6ed d!dd�d6ed d!de�d6ed d!dd�d6Zeje�d"�Zdd#�Zd$�Zed%�Zd&�Zd'�Zddd(�Zd)efd*��YZdS(+i����N(tto_text(tenv_fallback(tto_listtComplexList(texec_command(t
NetworkConfigt
ConfigLinetignore_lines[\r\n]?\[confirm yes/no\]:\s?$s[\r\n]?\[y/n\]:\s?$s[\r\n]?\[yes/no\]:\s?$thostttypetinttporttfallbacktANSIBLE_NET_USERNAMEtusernametANSIBLE_NET_PASSWORDtno_logtpasswordtANSIBLE_NET_SSH_KEYFILEtpathtssh_keyfiletANSIBLE_NET_AUTHORIZEtboolt	authorizetANSIBLE_NET_AUTH_PASSt	auth_passttimeouttdicttoptionstprovidertremoved_in_versiong333333@cCsdS(N((tmoduletwarnings((sP/usr/lib/python2.7/site-packages/ansible/module_utils/network/dellos6/dellos6.pyt
check_argsJscCs�|dkrgn|}d}|dj|�7}|j�}yt|SWn}tk
r�t||�\}}}|dkr�|jdddt|dd��nt|dd�j�}|t|<|SXdS(	Nsshow running-config t itmsgs!unable to retrieve current configtstderrterrorstsurrogate_or_strict(tNonetjointstript_DEVICE_CONFIGStKeyErrorRt	fail_jsonR(Rtflagstcmdtrctoutterrtcfg((sP/usr/lib/python2.7/site-packages/ansible/module_utils/network/dellos6/dellos6.pyt
get_configNs
%
cCsCitdt�d6t�d6t�d6}t||�}||�S(Ntkeytcommandtprompttanswer(RtTrueR(Rtcommandstspect	transform((sP/usr/lib/python2.7/site-packages/ansible/module_utils/network/dellos6/dellos6.pytto_commands`s

cCs�t�}t|t|��}x�|D]}}|j|�}t||�\}}}|r�|dkr�|jdt|dd�d|�n|jt|dd��q%W|S(NiR#R%R&R/(tlistR<RtjsonifyRR,Rtappend(RR9tcheck_rct	responsesR.R/R0R1((sP/usr/lib/python2.7/site-packages/ansible/module_utils/network/dellos6/dellos6.pytrun_commandsjs	
%cCs�t|d�\}}}|dkrI|jdddt|dd��nxut|�D]g}|dkrnqVnt||�\}}}|dkrV|jdt|dd�d	|d
|�qVqVWt|d�dS(Nsconfigure terminaliR#s"unable to enter configuration modeR1R%R&tendR5R/(RR,RR(RR9R/R0R1R5((sP/usr/lib/python2.7/site-packages/ansible/module_utils/network/dellos6/dellos6.pytload_configvs%/cCs�t�}t�}tdd�}|j|jd�}|rI|j}nx0|D](}t|t�rP|j|j�qPqPW|j	||jd�|S(Ntindentitparents(
R=tDellos6NetworkConfigt
get_objecttparamst	_childrent
isinstanceRR?trawtadd(trunning_configRtcontentstcurrent_config_contentstsublevel_configtobjtc((sP/usr/lib/python2.7/site-packages/ansible/module_utils/network/dellos6/dellos6.pytget_sublevel_config�s		
cCs)tjd�tjd�tjd�tjd�tjd�tjd�tjd�tjd�tjd	�tjd
�tjd�tjd�tjd
�tjd�tjd�tjd�tjd�tjd�tjd�tjd�tjd�tjd�tjd�tjd�tjd�tjd�tjd�g}tjd�}t�}t�}g}t}x�t|�jd�D]�}	ttjdd|	��j�}
t|
�}|	|_	|
s�t
|
|�r�t�}g}q�q�t}x�|D]�}|j|	�rt|�d kr;|j
j|�n|j|�|j|�|r�|jt|�d!g�|t|�d"j|�nt}qqqW|j|	�r�|rO|t|�d!jj|t|�d!�t|�d!kr(|t|�d"jj|t|�d!j�n|j
j|�|j�|j�n|s�t�}|rw|j
j|�nt�}n|j|�q�|tkrt|�d kr|s�|g}
|j|
�n|t|�d!j|�|j
j|�|j|�q�|s�|j|�q�q�W|S(#Ns^vlan !(priority).*$s	^stack.*$s
^interface.*$sdatacenter-bridging.*$sline (console|telnet|ssh).*$sip ssh !(server).*$sip dhcp pool.*$sip vrf !(forwarding).*$s&(ip|mac|management|arp) access-list.*$sipv6 (dhcp pool|router).*$smail-server.*$s
vpc domain.*$s	router.*$sroute-map.*$s
policy-map.*$sclass-map match-all.*$scaptive-portal.*$sadmin-profile.*$slink-dependency group.*$sbanner motd.*$sopenflow.*$ssupport-assist.*$stemplate.*$saddress-family.*$s"spanning-tree mst configuration.*$s|logging (?!.*(cli-command|buffered|console|email|facility|file|monitor|protocol|snmp|source-interface|traps|web-session)).*$s%(radius-server|tacacs-server) host.*$s^exit$s
s([{};])tiii(tretcompileR=tFalsetstrtsplittsubR)RRLRtmatchtlent_parentstextendR?tinsertR8RJtpop(tlinesREtcomment_tokenst
sublevel_cmdst	childlinetconfigtparenttchildrentparent_matchtlinettextR2tprtcfglist((sP/usr/lib/python2.7/site-packages/ansible/module_utils/network/dellos6/dellos6.pyt	os6_parse�s�		!		



,2

		RGcBseZd�Zdd�ZRS(cCst||j�|_dS(N(Rnt_indentt_items(tselfRO((sP/usr/lib/python2.7/site-packages/ansible/module_utils/network/dellos6/dellos6.pytload�scCs�t�}x�|jD]�}t|�dkr|xj|D]C}|jrg|j|jkru|j|�Pquq2|j|�Pq2Wq||kr|j|�qqW|S(Ntexit(R=titemsRYR^R?(RqtotherRtdifftitemt	diff_item((sP/usr/lib/python2.7/site-packages/ansible/module_utils/network/dellos6/dellos6.pyt
_diff_line�s	
	

N(t__name__t
__module__RrR'Ry(((sP/usr/lib/python2.7/site-packages/ansible/module_utils/network/dellos6/dellos6.pyRG�s	(RVtansible.module_utils._textRtansible.module_utils.basicRt)ansible.module_utils.network.common.utilsRRtansible.module_utils.connectionRt*ansible.module_utils.network.common.configRRRR*tWARNING_PROMPTS_RERR8tdellos6_provider_spectdellos6_argument_spectdellos6_top_spectupdateR!R'R3R<RBRDRTRnRG(((sP/usr/lib/python2.7/site-packages/ansible/module_utils/network/dellos6/dellos6.pyt<module> sL	

		
		X

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