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

�
���^c@@sQdZddlmZmZmZddlmZd�Zdddd�Z	dS(u
Send a message card to Microsoft Teams
======================================

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

.. versionadded:: 2017.7.0

.. code-block:: yaml

    teams-message:
      msteams.post_card:
        - message: 'This state was executed successfully.'
        - hook_url:  https://outlook.office.com/webhook/837

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

.. code-block:: yaml

    msteams:
      hook_url: https://outlook.office.com/webhook/837
i(tabsolute_importtprint_functiontunicode_literals(tSaltInvocationErrorcC@sdtkrdStS(uB
    Only load if the msteams module is available in __salt__
    umsteams.post_cardumsteams(t__salt__tFalse(((s7/usr/lib/python2.7/site-packages/salt/states/msteams.pyt__virtual__ sc	C@si|d6id6td6dd6}tdrMdj|�|d<d|d<|S|sjdj|�|d<|Sy)td	d
|d|d|d
|�}Wn)tk
r�}dj||�|d<nPXt|t�r�|r�t|d<dj|�|d<ndj|d|�|d<|S(u�
    Send a message to a Microsft Teams channel

    .. code-block:: yaml

        send-msteams-message:
          msteams.post_card:
            - message: 'This state was executed successfully.'
            - hook_url: https://outlook.office.com/webhook/837

    The following parameters are required:

    message
        The message that is to be sent to the MS Teams channel.

    The following parameters are optional:

    hook_url
        The webhook URL given configured in Teams interface,
        if not specified in the configuration options of master or minion.
    title
        The title for the card posted to the channel
    theme_color
        A hex code for the desired highlight color
    unameuchangesuresultuucommentutestu1The following message is to be sent to Teams: {0}uTeams message is missing: {0}umsteams.post_cardtmessagethook_urlttitlettheme_coloru!Failed to send message ({0}): {1}uSent message: {0}umessageN(	Rt__opts__tformattNoneRRt
isinstancetbooltTrue(tnameRRR	R
trettresulttsie((s7/usr/lib/python2.7/site-packages/salt/states/msteams.pyt	post_card's0






N(
t__doc__t
__future__RRRtsalt.exceptionsRRR
R(((s7/usr/lib/python2.7/site-packages/salt/states/msteams.pyt<module>s		

Zerion Mini Shell 1.0