%PDF- %PDF-
Direktori : /lib/python2.7/site-packages/salt/states/ |
Current File : //lib/python2.7/site-packages/salt/states/pushover.pyo |
� ���^c @@ sV d Z d d l m Z m Z m Z d � Z d d d d d d d d d d d � Z d S( u� Send a message to PushOver ========================== This state is useful for sending messages to PushOver during state runs. .. versionadded:: 2015.5.0 .. code-block:: yaml pushover-message: pushover.post_message: - user: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - title: Salt Returner - device: phone - priority: -1 - expire: 3600 - retry: 5 - message: 'This state was executed successfully.' The api key can be specified in the master or minion configuration like below: .. code-block:: yaml pushover: token: peWcBiMOS9HrZG15peWcBiMOS9HrZG15 i ( t absolute_importt print_functiont unicode_literalsc C@ s d t k r d St S( uC Only load if the pushover module is available in __salt__ u pushover.post_messageu pushover( t __salt__t False( ( ( s8 /usr/lib/python2.7/site-packages/salt/states/pushover.pyt __virtual__# s i c C@ s i | d 6i d 6t d 6d d 6} t d rM d j | � | d <d | d <| S| sj d j | � | d <| S| s� d j | � | d <| St d d | d | d | d | d | d | d | d | � } | r� t | d <d j | � | d <n d j | � | d <| S( u� Send a message to a PushOver channel. .. code-block:: yaml pushover-message: pushover.post_message: - user: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - title: Salt Returner - device: phone - priority: -1 - expire: 3600 - retry: 5 The following parameters are required: name The unique name for this event. user The user or group of users to send the message to. Must be ID of user, not name or email address. message The message that is to be sent to the PushOver channel. The following parameters are optional: title The title to use for the message. device The device for the user to send the message to. priority The priority for the message. expire The message should expire after specified amount of seconds. retry The message should be resent this many times. token The token for PushOver to use for authentication, if not specified in the configuration options of master or minion. u nameu changesu resultu u commentu testu4 The following message is to be sent to PushOver: {0}u PushOver user is missing: {0}u PushOver message is missing: {0}u pushover.post_messaget usert messaget titlet devicet priorityt expiret retryt tokenu Sent message: {0}u Failed to send message: {0}N( R t __opts__t formatt NoneR t True( t nameR R R R R R R t soundt api_versionR t rett result( ( s8 /usr/lib/python2.7/site-packages/salt/states/pushover.pyt post_message* s8 < N( t __doc__t __future__R R R R R R ( ( ( s8 /usr/lib/python2.7/site-packages/salt/states/pushover.pyt <module> s