%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/template.pyc

�
���^c	@@sEdZddlmZmZmZddlZddlZddlZddlZddl	Z
ddlZ
ddlZ
ddl
Z
ddlZ
ddlmZddlmZeje�ZdZeje�Zdddd	�Zd
�Zd�ZiZx9dD]1Zejd�\ZZ dj!e e�ee<qWd�Z"dS(u 
Manage basic template commands
i(tabsolute_importtprint_functiontunicode_literalsN(tsix(tStringIOuutf-8ubaseuc	K@sPi}	tjd|�d|kr2|jd�n|dkrt|tj�sdtjd|�|	Stjj	|�s�tjd|�|	St
jjj
|�r�tjd|�|	Stj|dt��3}
|
j�}|j�s�tjd|�|	SWd	QXnt||||||�}d
|k}t|�}xs|D]k\}
}t
jjj|�rk|jd�ntd|d
|�}|j|�|r�||d<ntj�}|
||||�}	tjd||
jjd�dtj�|�|	d	kr"tjd�|
||||�}	n|	}tj t!j"�r:t
jjj|	�r�tjd|t
jj#j$t
jj%j&|	j��|j'd���|	jd�q�q:q:W|rLt
jjj|	�r�t(}|	j�}nt)}|	}t|tj�rLd
|kr0|j*dd
�}|r't|�n|}	qI|rI|	jd�qIqLn|	S(uD
    Take the path to a template and return the high data structure
    derived from the template.

    Helpers:

    :param mask_value:
        Mask value for debugging purposes (prevent sensitive information etc)
        example: "mask_value="pass*". All "passwd", "password", "pass" will
        be masked (as text).
    ucompile template: %suenvu:string:u&Template was specified incorrectly: %suTemplate does not exist: %suTemplate is an empty file: %stencodingu&Template is nothing but whitespace: %sNu
it	renderersttmplpathuarglineu8Time (in seconds) to render '%s' using '%s' renderer: %su.i����g{�G�z�?uRendered data from file: %s:
%su
mask_valueu
(+tlogtdebugtpopt
isinstanceRtstring_typesterrortostpathtisfiletsalttutilstfilestis_emptytcodecstopentSLS_ENCODINGtreadtstripttemplate_shebangRtstringiotis_readabletseektdicttupdatettimetprofilet
__module__tsplittNonetsleeptisEnabledFortloggingtGARBAGEt
sanitizerstmask_args_valuetdatatdecodetgettTruetFalsetreplace(ttemplateRtdefaultt	blacklistt	whitelisttsaltenvtslst
input_datatkwargstrettifiletrender_pipetwindows_newlinetrendertarglinet
render_kwargststarttis_stringiotcontents((s1/usr/lib/python2.7/site-packages/salt/template.pytcompile_template#sv



$cC@s`tjjj�}tjjj|d��}|jt|�d�WdQXt|||||�S(ue
    Take template as a string and return the high data structure
    derived from the template.
    uwbiN(RRRtmkstemptfopentwritetSLS_ENCODERRC(R1RR2R3R4tfn_tofile((s1/usr/lib/python2.7/site-packages/salt/template.pytcompile_template_str�scC@s�d}|dkr%|j�d}n<tjjj|d��"}tjjj|j��}WdQX|jd�r�|jd�r�t	|j
�d|||�St	||||�SdS(	uY
    Check the template shebang line and return the list of renderers specified
    in the pipe.

    Example shebang lines::

      #!yaml_jinja
      #!yaml_mako
      #!mako|yaml
      #!jinja|yaml
      #!jinja|mako|yaml
      #!mako|yaml|stateconf
      #!jinja|yaml|stateconf
      #!mako|yaml_odict
      #!mako|yaml_odict|stateconf

    uu:string:iurNu#!u#!/i(R#RRRREtstringutilst
to_unicodetreadlinet
startswithtcheck_render_pipe_strR(R1RR2R3R4R7tlineR:((s1/usr/lib/python2.7/site-packages/salt/template.pyR�s!u
yaml_jinjau	yaml_makou
yaml_wempyu
json_jinjau	json_makou
json_wempyuyamlex_jinjauyamlexyamlex_makouyamlexyamlex_wempyu_u{0}|{1}c
C@s%|dkrgSg|jd�D]}|j�^q }g}y�|d|krs|tkrst|jd�}nx�|D]y}|djdd�\}}	|r�||ks�|r�||kr�tjd|�qzn|j|||	j�f�qzW|SWn"tk
r tjd|�gSXdS(u�
    Check that all renderers specified in the pipe string are available.
    If so, return the list of render functions in the pipe as
    (render_func, arg_str) tuples; otherwise return [].
    u|iu iuEThe renderer "%s" is disallowed by configuration and will be skipped.u"The renderer "%s" is not availableN(	R$R#RtOLD_STYLE_RENDERERSRtwarningtappendtKeyErrorR
(
tpipestrRR3R4trtpartstresultstparttnameR>((s1/usr/lib/python2.7/site-packages/salt/template.pyRO�s((
!
(	u
yaml_jinjau	yaml_makou
yaml_wempyu
json_jinjau	json_makou
json_wempyuyamlex_jinjauyamlexyamlex_makouyamlexyamlex_wempy(#t__doc__t
__future__RRRR RRR'tsalt.utils.dataRtsalt.utils.filestsalt.utils.stringiotsalt.utils.versionstsalt.utils.sanitizerstsalt.extRtsalt.ext.six.movesRt	getLoggert__name__RRt
getencoderRGRCRJRRQtcombR#tfmtttmpltformatRO(((s1/usr/lib/python2.7/site-packages/salt/template.pyt<module>sBd		'


Zerion Mini Shell 1.0