%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/elasticsearch_index_template.pyo

�
���^c@@scdZddlmZmZmZddlZddlmZeje	�Z
d�Zd�ZdS(u�
State module to manage Elasticsearch index templates

.. versionadded:: 2015.8.0
.. deprecated:: 2017.7.0 Use elasticsearch state instead
i(tabsolute_importtprint_functiontunicode_literalsN(tsixcC@s0i|d6id6td6dd6}y�tdd|�}|r�||kr�tdr�d	j|�|d<|||dd
<d|d<q�tdd|�|d<|dr�dj|�|d<|||dd
<q�d
j|�|d<ndj|�|d<Wn0tk
r+}t|d<tj|�|d<nX|S(ug
    Ensure that the named index template is absent.

    name
        Name of the index to remove
    unameuchangesuresultuucommentu elasticsearch.index_template_gettnameutestu"Index template {0} will be removeduoldu#elasticsearch.index_template_deleteu'Successfully removed index template {0}u7Failed to remove index template {0} for unknown reasonsu$Index template {0} is already absentN(	tTruet__salt__t__opts__tformattNonet	ExceptiontFalseRt	text_type(Rtrettindex_templateterr((sL/usr/lib/python2.7/site-packages/salt/states/elasticsearch_index_template.pytabsents$"



cC@s>i|d6id6td6dd6}y�tdd|�}|s�tdryd	j|�|d<i|d
6|d<d|d<qtdd|d|�}|r�d
j|�|d<itdd|�|d
6|d<qt|d<dj||�|d<ndj|�|d<Wn0tk
r9}t|d<tj|�|d<nX|S(u�
    .. versionadded:: 2015.8.0
    .. versionchanged:: 2017.3.0
        Marked ``definition`` as required.

    Ensure that the named index templat eis present.

    name
        Name of the index to add

    definition
        Required dict for creation parameters as per https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html

    **Example:**

    .. code-block:: yaml

        mytestindex2_template:
          elasticsearch_index_template.present:
            - definition:
                template: logstash-*
                order: 1
                settings:
                  number_of_shards: 1
    unameuchangesuresultuucommentu#elasticsearch.index_template_existsRutestu5Index template {0} does not exist and will be createdunewu#elasticsearch.index_template_createtbodyu'Successfully created index template {0}u elasticsearch.index_template_getu%Cannot create index template {0}, {1}u%Index template {0} is already presentN(	RRRRR	RR
RR(Rt
definitionR
tindex_template_existstoutputR((sL/usr/lib/python2.7/site-packages/salt/states/elasticsearch_index_template.pytpresent4s&"

%

(
t__doc__t
__future__RRRtloggingtsalt.extRt	getLoggert__name__tlogRR(((sL/usr/lib/python2.7/site-packages/salt/states/elasticsearch_index_template.pyt<module>s	!

Zerion Mini Shell 1.0