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

�
���^c@@s\dZddlmZmZmZddlZeje�Zd�Z	dddd�ZdS(u�
State to manage monitoring in Zenoss.

.. versionadded:: 2016.3.0

This state module depends on the 'zenoss' Salt execution module.

Allows for setting a state of minions in Zenoss using the Zenoss API. Currently Zenoss 4.x and 5.x are supported.

.. code-block:: yaml

    enable_monitoring:
      zenoss.monitored:
        - name: web01.example.com
        - device_class: /Servers/Linux
        - collector: localhost
        - prod_state: 1000
i(tabsolute_importtprint_functiontunicode_literalsNcC@sdtkrdStdfSdS(u@
    Only load if the Zenoss execution module is available.
    uzenoss.add_deviceuzenossu,The zenoss execution module is not availableN(t__salt__tFalse(((s6/usr/lib/python2.7/site-packages/salt/states/zenoss.pyt__virtual__su	localhostcC@s�i}||d<td|�}|r�t|d<d|d<dj|�|d<|dk	r�|d|kr�tdr�d	j|�|d<d|d<n$td
||�dj|�|d<idj|d�d
6dj|�d6|d<n|Stdr/dj|�|d<idd
6dd6|d<d|d<|Std||||�r�t|d<idd
6dd6|d<dj|�|d<n't|d<d|d<dj|�|d<|S(u[
    Ensure a device is monitored. The 'name' given will be used for Zenoss device name and should be resolvable.

    .. code-block:: yaml

        enable_monitoring:
          zenoss.monitored:
            - name: web01.example.com
            - device_class: /Servers/Linux
            - collector: localhost
            - prod_state: 1000
    unameuzenoss.find_deviceuresultuchangesu{0} is already monitoreducommentuproductionStateutestu6{0} is already monitored but prodState will be updateduzenoss.set_prod_stateu2{0} is already monitored but prodState was updateduprodState == {0}uoldunewu#The state of "{0}" will be changed.umonitored == Falseumonitored == Trueuzenoss.add_deviceu{0} has been added to ZenossuUnable to add {0} to ZenossN(RtTruetNonetformatt__opts__R(tnametdevice_classt	collectort
prod_statetrettdevice((s6/usr/lib/python2.7/site-packages/salt/states/zenoss.pyt	monitored%s<









(t__doc__t
__future__RRRtloggingt	getLoggert__name__tlogRRR(((s6/usr/lib/python2.7/site-packages/salt/states/zenoss.pyt<module>s
	

Zerion Mini Shell 1.0