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

�
���^c@@sQdZddlmZmZmZddlmZd�Zd�Zd�Z	dS(uX
Management of Zabbix host groups.

:codeauthor: Jiri Kotlin <jiri.kotlin@ultimum.io>


i(tabsolute_importtprint_functiontunicode_literals(tsixcC@s
dtkS(uI
    Only make these states available if Zabbix module is available.
    uzabbix.hostgroup_create(t__salt__(((s@/usr/lib/python2.7/site-packages/salt/states/zabbix_hostgroup.pyt__virtual__sc
K@s�i}d|kr#|d|d<nd|kr@|d|d<nd|kr]|d|d<ni|d6id6td6dd6}d	j|�}d
j|�}dj|�}iidj|�d
6d	j|�d6|6}td||�}tdr5|rt|d<||d<nd|d<||d<||d<|S|rRt|d<||d<netd||�}	d|	kr�t|d<||d<||d<n%t|d<|tj|	d�|d<|S(u�
    Ensures that the host group exists, eventually creates new host group.

    .. versionadded:: 2016.3.0

    :param name: name of the host group
    :param _connection_user: Optional - zabbix user (can also be set in opts or pillar, see module's docstring)
    :param _connection_password: Optional - zabbix password (can also be set in opts or pillar, see module's docstring)
    :param _connection_url: Optional - url of zabbix frontend (can also be set in opts, pillar, see module's docstring)

    .. code-block:: yaml

        create_testing_host_group:
            zabbix_hostgroup.present:
                - name: 'My hostgroup name'


    u_connection_useru_connection_passwordu_connection_urlunameuchangesuresultuucommentuHost group {0} created.u"Unable to create host group: {0}. uHost group {0} already exists.uHost group {0} does not exist.uoldunewuzabbix.hostgroup_existsutestuzabbix.hostgroup_createuerrorN(tFalsetformatRt__opts__tTruetNoneRt	text_type(
tnametkwargstconnection_argstrettcomment_hostgroup_createdtcomment_hostgroup_notcreatedtcomment_hostgroup_existstchanges_hostgroup_createdthostgroup_existsthostgroup_create((s@/usr/lib/python2.7/site-packages/salt/states/zabbix_hostgroup.pytpresentsB"











cK@si|d6id6td6dd6}dj|�}dj|�}dj|�}iid	j|�d
6dj|�d6|6}i}d|kr�|d|d<nd
|kr�|d
|d
<nd|kr�|d|d<ntd||�}tdr5|st|d<||d<nd|d<||d<||d<|Std||�}	|	set|d<||d<n�y%|	dd}
td|
|�}Wntk
r�t}nX|r�d|kr�t|d<||d<||d<n%t|d<|tj|d�|d<|S(u�
    Ensures that the host group does not exist, eventually delete host group.

    .. versionadded:: 2016.3.0

    :param name: name of the host group
    :param _connection_user: Optional - zabbix user (can also be set in opts or pillar, see module's docstring)
    :param _connection_password: Optional - zabbix password (can also be set in opts or pillar, see module's docstring)
    :param _connection_url: Optional - url of zabbix frontend (can also be set in opts, pillar, see module's docstring)

    .. code-block:: yaml

        delete_testing_host_group:
            zabbix_hostgroup.absent:
                - name: 'My hostgroup name'

    unameuchangesuresultuucommentuHost group {0} deleted.u"Unable to delete host group: {0}. uHost group {0} does not exist.uHost group {0} exists.uoldunewu_connection_useru_connection_passwordu_connection_urluzabbix.hostgroup_existsutestuzabbix.hostgroup_getiugroupiduzabbix.hostgroup_deleteuerrorN(	RRRRR	R
tKeyErrorRR(RR
Rtcomment_hostgroup_deletedtcomment_hostgroup_notdeletedtcomment_hostgroup_notexiststchanges_hostgroup_deletedRRt
hostgroup_gettgroupidthostgroup_delete((s@/usr/lib/python2.7/site-packages/salt/states/zabbix_hostgroup.pytabsent[sL"













N(
t__doc__t
__future__RRRtsalt.extRRRR(((s@/usr/lib/python2.7/site-packages/salt/states/zabbix_hostgroup.pyt<module>s
		C

Zerion Mini Shell 1.0