%PDF- %PDF-
Direktori : /lib/python2.7/site-packages/salt/states/ |
Current File : //lib/python2.7/site-packages/salt/states/ifttt.pyo |
� ���^c @@ sA d Z d d l m Z m Z m Z d � Z d d d d � Z d S( u+ Trigger an event in IFTTT ========================= This state is useful for trigging events in IFTTT. .. versionadded:: 2015.8.0 .. code-block:: yaml ifttt-event: ifttt.trigger_event: - event: TestEvent - value1: 'This state was executed successfully.' - value2: 'Another value we can send.' - value3: 'A third value we can send.' The api key can be specified in the master or minion configuration like below: .. code-block:: yaml ifttt: secret_key: bzMRb-KKIAaNOwKEEw792J7Eb-B3z7muhdhYblJn4V6 i ( t absolute_importt print_functiont unicode_literalsc C@ s d t k r d St S( u@ Only load if the ifttt module is available in __salt__ u ifttt.trigger_eventu ifttt( t __salt__t False( ( ( s5 /usr/lib/python2.7/site-packages/salt/states/ifttt.pyt __virtual__ s c C@ s� i | d 6i d 6t d 6d d 6} t d rM d j | � | d <d | d <| St d d | d | d | d | � | d <| r� | d r� t | d <d j | � | d <n d j | � | d <| S( u� Trigger an event in IFTTT .. code-block:: yaml ifttt-event: ifttt.trigger_event: - event: TestEvent - value1: 'A value that we want to send.' - value2: 'A second value that we want to send.' - value3: 'A third value that we want to send.' The following parameters are required: name The unique name for this event. event The name of the event to trigger in IFTTT. The following parameters are optional: value1 One of the values that we can send to IFTT. value2 One of the values that we can send to IFTT. value3 One of the values that we can send to IFTT. u nameu changesu resultu u commentu testu1 The following trigger would be sent to IFTTT: {0}u ifttt.trigger_eventt eventt value1t value2t value3u Triggered Event: {0}u Failed to trigger event: {0}N( R t __opts__t formatt NoneR t True( t nameR R R R t ret( ( s5 /usr/lib/python2.7/site-packages/salt/states/ifttt.pyt trigger_event&