%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/pillar/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/pillar/__init__.pyo

�
���^c@@s3dZddlmZmZmZddlZddlZddlZddlZddl	Z	ddl
ZddlZddl
Z
ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlmZddlmZddlmZddl m!Z!ddlm"Z"dd	l#m$Z$e	j%e&�Z'e(e(e(e(e(e(d
�Z)e(e(e(e(e(e(d�Z*de+fd
��YZ,de,fd��YZ-de,fd��YZ.de+fd��YZ/de+fd��YZ0de0fd��YZ1dS(u
Render the pillar data
i(tabsolute_importtprint_functiontunicode_literalsN(tSaltClientError(tcompile_template(tOrderedDict(t__version__(tmerge(tsixc	C@s�|d}	|jd�dkr4|	dkr4d}	nitd6td6j|	t�}
tjd�|dr�tjd�tjd	|�t||||d
|d|d|d
|�S|
|||||d|d|d
|d|�S(uJ
    Return the correct pillar driver based on the file_client option
    ufile_clientumaster_typeudisableuremoteulocaluDetermining pillar cacheupillar_cacheuCompiling pillar from cacheu*get_pillar using pillar cache with ext: %stextt	functionstpillar_overridet	pillarenvtextra_minion_data(tgettRemotePillartPillartlogtdebugtinfotPillarCache(toptstgrainst	minion_idtsaltenvR	tfuncsRRR
tfile_clienttptype((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyt
get_pillar,s 
!	




c	C@s�|d}	|jd�dkr4|	dkr4d}	nitd6td6j|	t�}
|
|||||d|d|d|d	|�S(
uJ
    Return the correct pillar driver based on the file_client option
    ufile_clientumaster_typeudisableuremoteulocalR
RRR
(RtAsyncRemotePillartAsyncPillar(RRRRR	RRRR
RR((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pytget_async_pillarEs
!	
tRemotePillarMixincB@seZdZd�ZRS(u,
    Common remote pillar functionality
    c@s��fd�}i}d�kr�t�dt�sPtjd�td��nx=�dD].}tjjj|||�dt	dt	�q[Wntj
d|�|S(u�
        Returns the extra data from the minion's opts dict (the config file).

        This data will be passed to external pillar functions.
        c@s�i}}�}|jd�}xC|d D]7}i||<||}|j|�sWiS||}q*W|d|kryiS||d||d<|S(uz
            Returns a dict containing the opts key subtree, while maintaining
            the opts structure
            u:i����(tsplitR(topts_keytret_dicttaux_dictt
config_valtsubkeystsubkey(R(s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyt
get_subconfigas


upass_to_ext_pillarsu*'pass_to_ext_pillars' config is malformed.trecursive_updatetmerge_listsuext_pillar_extra_data = %s(t
isinstancetlistRt	exceptionRtsalttutilst
dictupdatetupdatetTruettrace(tselfRR(t
extra_datatkey((Rs8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyt get_ext_pillar_extra_minion_data[s
(t__name__t
__module__t__doc__R7(((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyR WsRcB@sMeZdZdddddd�Zejjd��Zd�Z	d�Z
RS(u(
    Get the pillar from the master
    c

	C@s||_||jd<||_||_||_tjjjj|�|_	|dk	rh||jd<n|pqi|_t|jt
�s�i|_tjd�n|	p�i|_t|jt
�s�i|_tjd�ntjjj|j|j|�dtdt�t|_dS(Nusaltenvu	pillarenvu Pillar data must be a dictionaryu&Extra minion data must be a dictionaryR)R*(RR	RRR.t	transporttclienttAsyncReqChanneltfactorytchanneltNoneRR+tdictRterrorR
R/R0R1R7R2tFalset_closing(
R4RRRRR	R
RRR
((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyt__init__�s*	
					cc@si|jd6|jd6|jdd6|jdd6|jd6|jd6dd6d	d
6}|jrq|j|d<ny|jj|dd
�V}Wn*tk
r�t	j
d�td��nXt|t
�sdjt|�j|�}t	j|�t|��ntjj|��dS(uT
        Return a future which will contain the pillar data from the master
        uidugrainsusaltenvu	pillarenvupillar_overrideuextra_minion_datau2uveru_pillarucmduexttdictkeyupillaruException getting pillar:uException getting pillar.u;Got a bad pillar from master, type {0}, expecting dict: {1}N(RRRRR
R	R?t!crypted_transfer_decode_dictentryt	ExceptionRR-RR+RAtformatttypeR8RBttornadotgentReturn(R4tloadt
ret_pillartmsg((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pytcompile_pillar�s.




		


cC@s'|jr
dSt|_|jj�dS(N(RDR2R?tclose(R4((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pytdestroy�s		cC@s|j�dS(N(RS(R4((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyt__del__�sN(R8R9R:R@RERKRLt	coroutineRQRSRT(((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyR�s 	RcB@sAeZdZdddddd�Zd�Zd�Zd�ZRS(u(
    Get the pillar from the master
    c

	C@s||_||jd<||_||_||_tjjjj|�|_	|dk	rh||jd<n|pqi|_t|jt
�s�i|_tjd�n|	p�i|_t|jt
�s�i|_tjd�ntjjj|j|j|�dtdt�t|_dS(Nusaltenvu	pillarenvu Pillar data must be a dictionaryu&Extra minion data must be a dictionaryR)R*(RR	RRR.R;R<t
ReqChannelR>R?R@RR+RARRBR
R/R0R1R7R2RCRD(
R4RRRRR	R
RRR
((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyRE�s*	
					cC@s�i|jd6|jd6|jdd6|jdd6|jd6|jd6dd6d	d
6}|jrq|j|d<n|jj|dd
�}t|t	�s�t
jdt|�j
|�iS|S(u8
        Return the pillar data from the master
        uidugrainsusaltenvu	pillarenvupillar_overrideuextra_minion_datau2uveru_pillarucmduextRFupillaru9Got a bad pillar from master, type %s, expecting dict: %s(RRRRR
R	R?RGR+RARRBRJR8(R4RNRO((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyRQ�s$




		cC@s6t|d�r|jrdSt|_|jj�dS(Nu_closing(thasattrRDR2R?RR(R4((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyRSs	cC@s|j�dS(N(RS(R4((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyRT	sN(R8R9R:R@RERQRSRT(((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyR�s		RcB@sAeZdZdddddd�Zd�Zd�Zd�ZRS(u/
    Return a cached pillar if it exists, otherwise cache it.

    Pillar caches are structed in two diminensions: minion_id with a dict of
    saltenvs. Each saltenv contains a pillar dict

    Example data structure:

    ```
    {'minion_1':
        {'base': {'pilar_key_1' 'pillar_val_1'}
    }
    c

C@s�||_||_||_||_||_||_||_|dkrWd|_n	||_t	j
jjj
|jd|jdd|j|��|_dS(Nubaseupillar_cache_backendupillar_cache_ttltminion_cache_path(RRRR	R
RRR@RR.R/tcachetCacheFactoryR>t_minion_cache_path(
R4RRRRR	R
RRR
((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyREs								

cC@stjj|jdd|�S(un
        Return the path to the cache file for the minion.

        Used only for disk-based backends
        ucachedirupillar_cache(tostpathtjoinR(R4R((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyR[5sc
C@sbtjd|j�t|j|j|j|jd|jd|jd|j	d|j
�}|j�S(un
        In the event of a cache miss, we need to incur the overhead of caching
        a new pillar.
        u1Pillar cache getting external pillar with ext: %sR	R
RR(RRR	RRRRRR
RRRQ(R4tfresh_pillar((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pytfetch_pillar=s					cO@s"tjd|j|j�tjd|jj�|j|jkr�|j|j|jkr�tjd|j|j�|j|j|jS|j�}||j|j|j<tjd|j|j�|SnS|j�}i||j6|j|j<tjd|j�tjd|jj�|SdS(NuFScanning pillar cache for information about minion %s and pillarenv %suScanning cache: %su/Pillar cache hit for minion %s and pillarenv %su0Pillar cache miss for pillarenv %s for minion %suPillar cache miss for minion %suCurrent pillar cache: %s(RRRRRYt_dictR`(R4targstkwargsR_((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyRQMsN(R8R9R:R@RER[R`RQ(((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyR
s
		RcB@s�eZdZdddddd�Zd�Zd�Zdddd�Zd�Zd�Z	d�Z
d�Zd	�Ze
d
�Zdd�Zdd�Zd
�Zdd�Zed�Zd�Zd�Zd�ZRS(uC
    Read over the pillar top files and render the pillar data
    c
C@sv||_||_|dkr@|jdt�r@||d<q@n|j||d|d|�|_||_tj	j
|jt�|_|j
�|_|jdd�dkr�||d<n|dkr.tjj|�}
|jdd�dkr
tjj|d	|
�|_q7tjj|jd	|
�|_n	||_||jd
<tjj|j�|_tjj|j|j�|_tj|j�}d|kr�|d|d<nd|_|jd
�r�|d
|_ntjj||j�|_i|_|p�i|_t|jt�s/i|_tj d�n|	p8i|_!t|j!t�sii|_!tj d�nt|_"dS(Nupillarenv_from_saltenvu	pillarenvRRufile_clientuulocalugrainsR/u	minion_iduidusmartupillar_source_merging_strategyu Pillar data must be a dictionaryu&Extra minion data must be a dictionary(#RR	R@RRCt_Pillar__gen_optsRRR.t
fileclienttget_file_clientR2R<t_Pillar__gather_availtavailtloaderR/tminion_modsR
tmatcherstrendertrendtcopytdeepcopytmerge_strategytpillarstext_pillarstignored_pillarsRR+RARRBR
RD(R4RRRRR	R
RRR
R/text_pillar_opts((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyREjsJ		!	
!	
				cC@s�t|jt�s)tjd|j�tS|jdg�}y2tg|jD]}||krK|^qK�}Wntk
r�tjd�tSX|r�tjddj	t
|��dj	|��tStS(uJ
        Check to see if the on demand external pillar is allowed
        u4On-demand pillar %s is not formatted as a dictionaryuon_demand_ext_pillarulThe 'on_demand_ext_pillar' configuration option is malformed, it should be a list of ext_pillar module namesu�The following ext_pillar modules are not allowed for on-demand pillar data: %s. Valid on-demand ext_pillar modules are: %s. The valid modules can be adjusted by setting the 'on_demand_ext_pillar' config option.u, (R+R	RARRBRCRtsett	TypeErrorR^tsortedR2(R4Rt	on_demandtxtinvalid_on_demand((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyt__valid_on_demand_ext_pillar�s&
2
cC@s7i}x*|j�D]}|jj|�||<qW|S(uH
        Gather the lists of available sls data from the master
        (t	_get_envsR<tlist_states(R4RhR((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyt__gather_avail�scC@s�tj|�}d|d<|s,i|d<n
||d<|dk	rH|n|jd�|d<|dk	rm|n|jd�|d<|j|d<|djd�r�|d|d<nT|djd	�r�tjjj	|dd
�|d<ntjjj	|d�|d<|j
rS|j|�rSd|kr@|dj|j
�qS|j
g|d<nd|d
kr�|jd�p�|jd�p�d}||d
kr�t
jd|�|d
jd�|d
|<q�t
jd|�|d
jd�n|S(uN
        The options need to be altered to conform to the file client
        ulocalufile_clientugrainsusaltenvu	pillarenvuidu	state_topusalt://u/iu
ext_pillaru__env__upillar_rootsubaseu>pillar environment '%s' maps to __env__ pillar_roots directoryuEpillar_roots __env__ ignored (environment '%s' found in pillar_roots)N(RnRoR@RRt
startswithR.R/turltcreateR	t#_Pillar__valid_on_demand_ext_pillartappendRRtpop(R4topts_inRRR	RRtenv((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyt
__gen_opts�s8



$$	cC@s?tdg�}d|jkr;|jt|jd��n|S(uM
        Pull the file server environments out of the master options
        ubaseupillar_roots(RuRR1R,(R4tenvs((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyR|�scC@sstjt�}tjt�}tjt�}g}y;t�}|jdr�|jd|jdkr�tjd|jddj|jd��q�|j|jd�nF|j	�}|jj
dd�dkr�|t|jp�dg�M}nxz|D]r}|j
j|jd|�}|r�||jt||j|jd	|jd
|jdd|d
t��q�q�WWn<tk
r�}|jdj|��tjd|j�nXxstj|�D]b\}}	xS|	D]K}
d|
kr�q�nx#|
dD]}||j|�q�W|
jd�q�Wq�WxC|rhg}xtj|�D]�\}}
|j|�|
sgqBnx�|
D]�}|||kr�qnnyf||jt|j
j||�j
dt�|j|jd	|jd
|jdd|d
t��Wn,tk
r}|jdj||��nX||j|�qnWqBWx*|D]"}||kr?|j|�q?q?Wq&W||fS(u&
        Gather the top files
        u	pillarenvupillar_rootsuCpillarenv '%s' not found in the configured pillar environments (%s)u, upillar_source_merging_strategyunoneubaseu	state_topurendererurenderer_blacklisturenderer_whitelistRt_pillar_rendu4Rendering Primary Top file failed, render error:
{0}u%Pillar rendering failed for minion %suincludeudestu0Rendering Top file {0} failed, render error:
{1}N(tcollectionstdefaultdictR,RuRRRR^taddR|RR@RR<t
cache_fileR�RRmR2RHRIR-RRt	iteritemsR�t	get_stateRC(R4ttopstincludetdoneterrorstsaltenvsRttoptexctctopstctoptslstpopststates((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pytget_tops�s�	
$






	


			



c
C@stjt�}tjt�}x�tj|�D]�}x�|D]�}x�tj|�D]�\}}|dkroqQnxz|D]r}g}	t�}
d|||<t}x�|||D]�}t|t�r`d|kr�|	j	|�nd|krB|d}
t|
t
�s1yt
|
�}
Wq1tk
r-d}
q1Xn|
|||<n|jdt�r`t
}q`nt|tj�r�t
|
|<q�q�W|r�||jkr�g|j|<n|j|j|
j��n|	|||<|||j|
�qvWqQWq;Wq.W|j||�S(u-
        Cleanly merge the top files
        uincludeiumatchuorderuignore_missing(R�R�RRt
itervaluesR�RCR+RAR�tintt
ValueErrorRR2tstring_typesRstextendtkeystsort_top_targets(R4R�R�tordersR�R�RttargetsttgttmatchesR�tignore_missingtcomptorder((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyt
merge_topsPsF

	


%c@sttjt�}x^tj|�D]M\�}t|d��fd��}x |D]}|||�|<qPWqW|S(uH
        Returns the sorted high data from the merged top files
        R6c@s��|S(N((ttarget(R�R(s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyt<lambda>�s(R�R�RRR�Rw(R4R�R�t
sorted_topR�tsorted_targetsR�((R�Rs8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyR�xs	
cC@s[|j�\}}y|j|�}Wn)tk
rP}t�}|jd�nX||fS(uA
        Returns the high data derived from the top file
        u2Error encountered while rendering pillar top file.(R�R�RvRR�(R4R�R�tmerged_topsterr((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pytget_top�s	c
C@s%i}|r'tjj|j�|_nx�tj|�D]�\}}|jdrl||jdkrlq7qlnx�tj|�D]�\}}|jd|||jjdi��r|||kr�g||<}n
||}x?|D]4}	t|	tj�r�|	|kr�|j	|	�q�q�Wq|q|Wq7W|S(u�
        Search through the top high data for matches and return the states
        that this minion needs to execute.

        Returns:
        {'saltenv': ['state1', 'state2', ...]}

        reload
            Reload the matcher loader
        u	pillarenvuconfirm_top.confirm_topu
nodegroups(
R.RiRkRRR�RR+R�R�(
R4R�treloadR�Rtbodytmatchtdatatenv_matchestitem((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyttop_matches�s&
	


cC@s|dkri}nd}g}|jj||�jdt�}|s5||jj|g�kr�tjd||�d||fS|jdj|�r�dj	||�}tj
|�|j|�q5dj	||�}|jjdt�tkr|d7}n|d	j	||�7}tj|�d||fSnd}	yCt
||j|jd
|jd|jd||d
t|�}	Wnstk
r�}
dj	||
�}tj|dt�|jjdt�r�|jdj	|��q�|j|�nX|j|�d}|	r�t|	t�sHdj	|�}tj
|�|j|�q�d|	kr�t|	dt�s�dj	|�}tj
|�|j|�q�g}x�|	jd�D]�}
t|
t�rttj|
��\}
}|jdi�}|jdd�}nd}y2tj|j||
jd�jdd��}Wn3tk
rm|jdj	|�g�|
g}nXx�|D]�}||kru|j ||||�\}}}|rE|r�x-t!|j"d��D]}i||6}q�Wn|jjdt�s	|j|�qEt#|	||j$|jjd
d�|jjdt��}	n|r[||7}q[ququWq�W|jjdt�s�|j|	�d}	x_|D]T}|	dkr�|}	q�t#|	||j$|jjd
d�|jjdt��}	q�Wq�q�n|	||fS(u@
        Collect a single pillar sls file and render it
        uudestu9Skipping ignored and missing SLS '%s' in environment '%s'upillar_rootsuLSpecified SLS '{0}' in environment '{1}' is not available on the salt masteru8Specified SLS '{0}' in environment '{1}' was not found. u__git_pillaru�This is likely caused by a git_pillar top file containing an environment other than the one for the branch in which it resides. Each git_pillar branch/tag must have its own top file.u�This could be because SLS '{0}' is in an environment other than '{1}', but '{1}' is included in that environment's Pillar top file. It could also be due to environment '{1}' not being defined in 'pillar_roots'.urendererurenderer_blacklisturenderer_whitelistR�u-Rendering SLS '{0}' failed, render error:
{1}texc_infoupillar_safe_render_erroru>Rendering SLS '{0}' failed. Please see master log for details.u)SLS '{0}' does not render to a dictionaryuincludeu8Include Declaration in SLS '{0}' is not formed as a listudefaultsukeyu.u/u:No matching pillar environment for environment '{0}' foundu:upillar_includes_override_slsuyamlupillar_merge_listsN(%R@R<R�RRCRsRRRRIRBR�R2RRmRHtcriticalR�R+RAR,R�tnextRR�tfnmatchtfilterRhtlstriptreplacetKeyErrorR�t
render_pstatetreversedR!RRp(R4R�RtmodstdefaultsR�R�tfn_RPtstateR�tnstatetinclude_statestsub_slstvR6tmatched_pstatest	m_sub_slstkey_fragmentts((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyR��s�	!	












	

"





	%c
C@s�tj|j�}|dkr'g}nx�tj|�D]v\}}g}t�}x�|D]y}g}	ytj|j||�}	Wn*t	k
r�|j
dj|�g�nX|	r�|j
|	�qY|j|�qYWx�|D]�}
|j
|
||�\}}}|r||7}n|dk	r�t|t�smtjd|
djg|D]}
dj|
�^qH��q�nt|||j|jjdd�|jjdt��}q�q�Wq7W||fS(	ug
        Extract the sls pillar files from the matches and render them into the
        pillar
        u:No matching pillar environment for environment '{0}' foundu�The rendered pillar sls file, '%s' state did not return the expected data format. This is a sign of a malformed pillar sls file. Returned errors: %su, u'{0}'urendereruyamlupillar_merge_listsN(RnRR@RR�RuR�R�RhR�R�RIR�R�R+RARRBR^RRpRRRC(R4R�R�tpillarRtpstatestpstatefilesR�t	sls_matchR�R�tpstateR�te((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyt
render_pillarAsF		



,#cC@sXd}tjjj|j|�j}t|t�r�d|krq|jrq|j||j	|d|j|�}qT|j||j	||�}n�t|t
�r�d|kr�|jr�|j||j	|d|j|�}qT|j||j	||�}nYd|kr8|jr8|j||j	||d|j�}n|j||j	||�}|S(uY
        Builds actual pillar data structure and updates the ``pillar`` variable
        uextra_minion_dataR
N(R@R.R/Rbtget_function_argspecRrR+RAR
RR,(R4R�tvalR6R	Rb((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyt_external_pillar_datats4


	c
C@s	|dkrg}ny�|jr�d|jkr�|jjd�dkr�ddl}ddl}|jjj|j|jdd|j	j
jd|j	j
jd|j	j
j
�}|j�nWntk
r�nXd	|jkr�||fSt|jd	t�s(|jd
�tj|d�||fSd}|jrvt||j|j|jjdd
�|jjdt��}nx�|jd	D]w}t|t�s�|jd
�tj|d�i|fSttj|��|jjdg�kr�q�nx�tj|�D]�\}}||jkr2tjd|�qny|j|||�}Wqt k
r�}	|jdj!||	j"���tj#d|dj$t%j&t'j(�d���qXqW|r�t|||j|jjdd
�|jjdt��}d}q�q�W||fS(u1
        Render the external pillar data
        ugitu__roleuminioniNtper_remote_overridestper_remote_onlytglobal_onlyu
ext_pillaru$The "ext_pillar" option is malformedi����urendereruyamlupillar_merge_listsuexclude_ext_pillaru0Specified ext_pillar interface %s is unavailableu"Failed to load ext_pillar {0}: {1}u,Exception caught loading ext_pillar '%s':
%sui()R@R	RRtsalt.utils.gitfstsalt.pillar.git_pillarR/tgitfst	GitPillarR�t
git_pillartPER_REMOTE_OVERRIDEStPER_REMOTE_ONLYtGLOBAL_ONLYt
fetch_remotesRvR+R,R�RR�RRRpRCRAR�RtiterkeysR�RrR�RHRIt__str__RBR^t	tracebackt	format_tbtsysR�(
R4R�R�R.R�R	trunR6R�R�((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyt
ext_pillar�s�	




	

*	
.
c
	C@s�|j�\}}|r|jjdt�r�|j|j�\|jd<}tjj|j|j	�|_
|j|dt�}|j
|d|�\}}t|jd||j|jjdd�|jjdt��}qC|j|�}|j
|�\}}|j|d|�\}}n$|j|�}|j
|�\}}|j|�|jjdt�r�t|j�}d	|kr�|jd	�nt|d
<||d<nd|jkr|jjdt�rt|jd||j|jjdd�|jjdt��}n|rBx|D]}tjd
|�qW||d<n|jr�t||j|j|jjdd�|jjdt��}n|j|�}	|	r�|jdg�j|	�n|S(u3
        Render the pillar data and return
        uext_pillar_firstupillarR�R�urendereruyamlupillar_merge_listsupillar_optsugrainsusaltversionumasterussh_merge_pillaruPillar render error: %su_errors(R�RRRCR�RR.RiRlR
RmR�R2R�RRpR�RAR�RRR�tdecrypt_pillart
setdefault(
R4R	R�t
top_errorsR�R�R�tmoptsRBtdecrypt_errors((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyRQ�s^



$


	cC@sg}|jjd�r|jd}t|t�sStjjj|jd�}n|si|jd�nx�t	j
|�D]�\}}tjjj||ddd|jd�}|dkr�t
jd|�qynyt|�t}Wntk
r�t}nXy�tjjj||p"|jdd|jd	|jd
|jd�}|r�|j|jd�\}	}
}|	s{|}n+tjjj||	ddd|jd�}|dk	r�|||<q�nWqytk
r
}dj||�}
|j|
�t
j|
d
t�qyXqyWn|S(uW
        Decrypt the specified pillar dictionary items, if configured to do so
        udecrypt_pillaru)decrypt_pillar config option is malformedtdefaultt	delimiterudecrypt_pillar_delimiteruPillar key %s not presentudecrypt_pillar_defaultt	renderersRt
valid_rendudecrypt_pillar_renderersu'Failed to decrypt pillar key '{0}': {1}R�N(RRR+RAR.R/R�trepack_dictlistR�RR�t
traverse_dictR@RRthashR2RvRCtcrypttdecryptRmt
rpartitionRHRIRB(R4R�R�R�R6Rmtptrt	immutabletrettparentt_tchildR�RP((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyR�!s\




			
cC@s|jr
dSt|_dS(uS
        This method exist in order to be API compatible with RemotePillar
        N(RDR2(R4((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyRS]s	cC@s|j�dS(N(RS(R4((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyRTesN(R8R9R:R@RER�RgRdR|R�R�R�R�RCR�R�R�R�R�R2RQR�RSRT(((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyRfs(0	"		(			Y	(		!�3	$P9	<	RcB@s eZejjed��ZRS(cC@s1tt|�jd|�}tjj|��dS(NR	(tsuperRRQRKRLRM(R4R	R�((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyRQls(R8R9RKRLRUR2RQ(((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyRks	(2R:t
__future__RRRRnR�R\R�tloggingttornado.genRKR�R�tinspecttsalt.loaderR.tsalt.fileclienttsalt.miniontsalt.transport.clienttsalt.utils.argstsalt.utils.cachetsalt.utils.crypttsalt.utils.datatsalt.utils.dictupdatetsalt.utils.urltsalt.exceptionsRt
salt.templateRtsalt.utils.odictRtsalt.versionRRtsalt.extRt	getLoggerR8RR@RRtobjectR RRRRR(((s8/usr/lib/python2.7/site-packages/salt/pillar/__init__.pyt<module>sR		.GAY���

Zerion Mini Shell 1.0