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

�
���^c@@sGdZddlmZmZmZd�Zdddded�ZdS(u�
Send a message to Hipchat
=========================

This state is useful for sending messages to Hipchat during state runs.

The property api_url is optional. By defaul will use the public HipChat API at https://api.hipchat.com

.. versionadded:: 2015.5.0

.. code-block:: yaml

    hipchat-message:
      hipchat.send_message:
        - room_id: 123456
        - from_name: SuperAdmin
        - message: 'This state was executed successfully.'
        - api_url: https://hipchat.myteam.com
        - api_key: peWcBiMOS9HrZG15peWcBiMOS9HrZG15
        - api_version: v1

The api key can be specified in the master or minion configuration like below:

.. code-block:: yaml

    hipchat:
      api_key: peWcBiMOS9HrZG15peWcBiMOS9HrZG15
      api_version: v1

i(tabsolute_importtprint_functiontunicode_literalscC@sdtkrdStS(uB
    Only load if the hipchat module is available in __salt__
    uhipchat.send_messageuhipchat(t__salt__tFalse(((s7/usr/lib/python2.7/site-packages/salt/states/hipchat.pyt__virtual__%suyellowc	
C@s"i|d6id6td6dd6}	tdrMdj|�|	d<d|	d<|	S|sjdj|�|	d<|	S|s�d	j|�|	d<|	S|s�d
j|�|	d<|	Stdd|d
|d|d|d|d|d|d|�|	d<|	r|	drdj|�|	d<ndj|�|	d<|	S(u9
    Send a message to a Hipchat room.

    .. code-block:: yaml

        hipchat-message:
          hipchat.send_message:
            - room_id: 123456
            - from_name: SuperAdmin
            - message: 'This state was executed successfully.'
            - api_url: https://hipchat.myteam.com
            - api_key: peWcBiMOS9HrZG15peWcBiMOS9HrZG15
            - api_version: v1
            - message_color: green
            - notify: True

    The following parameters are required:

    name
        The unique name for this event.

    room_id
        The room to send the message to. Can either be the ID or the name.

    from_name
        The name of that is to be shown in the "from" field.
        If not specified, defaults to.

    message
        The message that is to be sent to the Hipchat room.

    The following parameters are optional:

    api_url
        The API URl to be used.
        If not specified here or in the configuration options of master or minion,
        will use the public HipChat API: https://api.hipchat.com

    api_key
        The api key for Hipchat to use for authentication,
        if not specified in the configuration options of master or minion.

    api_version
        The api version for Hipchat to use,
        if not specified in the configuration options of master or minion.

    message_color
        The color the Hipchat message should be displayed in. One of the following, default: yellow
        "yellow", "red", "green", "purple", "gray", or "random".

    notify
        Should a notification in the room be raised.
    unameuchangesuresultuucommentutestu3The following message is to be sent to Hipchat: {0}uHipchat room id is missing: {0}u!Hipchat from name is missing: {0}uHipchat message is missing: {0}uhipchat.send_messagetroom_idtmessaget	from_nametapi_urltapi_keytapi_versiontcolortnotifyuSent message: {0}uFailed to send message: {0}N(Rt__opts__tformattNoneR(
tnameRRRR	R
Rt
message_colorR
tret((s7/usr/lib/python2.7/site-packages/salt/states/hipchat.pytsend_message,s<>





N(	t__doc__t
__future__RRRRRRR(((s7/usr/lib/python2.7/site-packages/salt/states/hipchat.pyt<module>s	

Zerion Mini Shell 1.0