%PDF- %PDF-
Mini Shell

Mini Shell

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

�
���^c	@@s%dZddlmZmZmZddlZddlZddlZddl	Zddl
ZddlZddlZddl
mZeZyddlmZeZWnek
r�nXejdej�eje�Zd�Zd�Zdddd	ed
edd�Zd	d
dd�ZdS(
u_
Management of Heat
==================

.. versionadded:: 2017.7.0

:depends:   - heat Python module
:configuration: See :py:mod:`salt.modules.heat` for setup instructions.

The heat module is used to create, show, list and delete Heat staks.
Stack can be set as either absent or deploy.

.. code-block:: yaml

  heat.deployed:
    - name:
    - template: #Required
    - environment:
    - params: {}
    - poll: 5
    - rollback: False
    - timeout: 60

  heat.absent:
    - name:
    - poll: 5

mysql:
  heat.deployed:
    - template: salt://templates/mysql.heat.yaml
    - params:
      image: Debian 7
    - rollback: True

.. versionadded:: 2017.7.5,2018.3.1

    The spelling mistake in parameter `enviroment` was corrected to `environment`.
    The misspelled version is still supported for backward compatibility, but will
    be removed in Salt Neon.

i(tabsolute_importtprint_functiontunicode_literalsN(tsix(t	jsonutilstlevelcC@str
dStdfS(u6
    Only load if the mysql module is in __salt__
    uheatu_The heat state module cannot be loaded: the oslo_serialization python library is not available.(tHAS_OSLOtFalse(((s4/usr/lib/python2.7/site-packages/salt/states/heat.pyt__virtual__FscC@s�|j�}|jd�r3tjjj|�}nbytjjj|�}Wn1tjjjk
r}t	t
j|���nX|dkr�i}nd|kp�d|kp�d|ks�t	d��n|S(u
    Parsing template
    u{uHeatTemplateFormatVersionuheat_template_versionuAWSTemplateFormatVersionu"Template format version not found.N(
tstript
startswithtsalttutilstjsontloadstyamlt	safe_loadt	YAMLErrort
ValueErrorRt	text_typetNone(ttmpl_strttpltexc((s4/usr/lib/python2.7/site-packages/salt/states/heat.pyt_parse_templatePs	ii<c	"K@s�|d-kr@d|	kr@tjjjdd�|	jd�}ntjddj||||||||||	�
�id-d6dd6id	6t	d
6}
|s�t
|
d
<d|
d<|
S|f|
d<td|d
|�}|d
r|rdj|�|
d<|
S|d
r�|r�|rtjjj
�}tdd|dd-d|dd-dd-dd-dd-dddd-dd-dt
dd-�\}
}}tdd|d|
dd-d|d |dd-dd-dd-ddd!d-d"t	dd-d#t
d$d-d%d-�}|d
std&r�|d
t
k	r�tjjj|d'���}tjjj|j��}tjjj|�ybt|�}d(|kr�tjjj|�}ntj|d)d*d+t
�}tjjj|�Wn0tk
r�}t
|
d
<d,j|�|
d<nXWd-QXq/t
|
d
<d.j||�|
d<nt
|
d
<d/|
d<|
d
t	kr�td0d|d
|�}|d
s�t
|
d
<|d|
d<q�n|
d
t
kr�|
Sy(td1|�}td1|d2�}Wn6tjjk
r�}t
|
d
<d3j|�|
d<nX|
d
t	krb||krbtd&r<t	|
d
<dj|�|
d<|
St
|
d
<d4j||�|
d<qbn|
d
t
krv|
Std&r�id-d
6d5j|�d6}qtd6d|d7|d8|d9|d:|d;|d<|d
|�}||
d	d=<d>|
d	d<n�td&r&id-d
6d?j|�d6}nYtd@d|d7|d8|d9|d:|d;|d<|d
|�}||
d	d=<dA|
d	d<|d
|
d
<|d|
d<|
S(Bu�
    Deploy stack with the specified properties

    name
        The name of the stack

    template
        File of template

    environment
        File of environment

    params
        Parameter dict used to create the stack

    poll
        Poll (in sec.) and report events until stack complete

    rollback
        Enable rollback on create failure

    timeout
        Stack creation timeout in minutes

    profile
        Profile to use

    .. versionadded:: 2017.7.5,2018.3.1

        The spelling mistake in parameter `enviroment` was corrected to `environment`.
        The misspelled version is still supported for backward compatibility, but will
        be removed in Salt Neon.

    u
enviromentuNeonu{Please use the 'environment' parameter instead of the misspelled 'enviroment' parameter which will be removed in Salt Neon.uDeployed with(u1{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9})unameuucommentuchangesuresultuName ist not validuheat.show_stacktprofileuStack {0} is deployedufile.get_managedtnamettemplatetsourcetsource_hashtusertgrouptmodetsaltenvubasetcontexttdefaultstskip_verifytkwargsufile.manage_filetsfntrett
source_sumtbackuptmakedirstshow_changestcontentstdir_modeutesturuheat_template_versiontindentitensure_asciiuError parsing template {0}NuCan not open template: {0} {1}uCan not open templateuheat.template_stackuhashutil.digestutemplateu{0}u%Templates have same checksum: {0} {1}uStack {0} is set to be updateduheat.update_stackt
template_filetenvironmentt
parameterstpolltrollbackttimeoutu
stack_nameuUpdate stackuStack {0} is set to be createduheat.create_stackuCreate stack(RRRtversionst
warn_untiltpoptlogtdebugtformattTrueRt__salt__tfilestmkstempt__opts__tfopentstringutilst
to_unicodetreadtsafe_rmRRt	safe_dumpRtdumpsRt
exceptionstCommandExecutionError(RRR1tparamsR3R4R5tupdateRtconnection_argsR'texisting_stackttemplate_tmp_filettsfnR(tcomment_ttemplate_manage_resultttfp_Rttemplate_parsettemplate_newtexttemplate_stacktchecksum_templatetchecksum_stacktcmdexctstack((s4/usr/lib/python2.7/site-packages/salt/states/heat.pytdeployedfs�%	






	

 









	
	c	C@s1tjddj|||��idd6dd6id6td6}|s`t|d<d|d<|S|f|d<td	|d
|�}|ds�t|d<d|d<|Stdr�d|d<d
j|�|d<|Stdd|d|d|d
|�}|d|d<|d|d<||dd<d|dd<|S(u
    Ensure that the named stack is absent

    name
        The name of the stack to remove

    poll
        Poll(in sec.) and report events until stack complete

    timeout
        Stack creation timeout in minutes

    profile
        Profile to use

    uAbsent with(u
{0}, {1} {2})unameuucommentuchangesuresultuName ist not validuheat.show_stackRuStack not existutestuStack {0} is set to be removeduheat.delete_stackRR3R5u
stack_nameuDelete stackN(R9R:R;RR<RR=R@(RR3R5RR'RMRZ((s4/usr/lib/python2.7/site-packages/salt/states/heat.pytabsents6	









(t__doc__t
__future__RRRtloggingtsalt.exceptionsRtsalt.utils.filestsalt.utils.jsontsalt.utils.stringutilstsalt.utils.versionstsalt.utils.yamltsalt.extRRRtoslo_serializationRR<tImportErrortbasicConfigtDEBUGt	getLoggert__name__R9RRRR[R\(((s4/usr/lib/python2.7/site-packages/salt/states/heat.pyt<module>*s,

	
	�

Zerion Mini Shell 1.0