%PDF- %PDF-
Direktori : /lib/python2.7/site-packages/salt/states/ |
Current File : //lib/python2.7/site-packages/salt/states/xmpp.pyo |
� ���^c @@ sG d Z d d l m Z m Z m Z d � Z d � Z d d d � Z d S( ux Sending Messages over XMPP ========================== .. versionadded:: 2014.1.0 This state is useful for firing messages during state runs, using the XMPP protocol .. code-block:: yaml server-warning-message: xmpp.send_msg: - name: 'This is a server warning message' - profile: my-xmpp-account - recipient: admins@xmpp.example.com/salt i ( t absolute_importt print_functiont unicode_literalsc C@ s d t k r d St S( u? Only load if the XMPP module is available in __salt__ u xmpp.send_msgu xmpp( t __salt__t False( ( ( s4 /usr/lib/python2.7/site-packages/salt/states/xmpp.pyt __virtual__ s c C@ s� i | d 6i d 6d d 6d d 6} t d rF d j | | � | d <| St d d | d | g d | � t | d <d j | | � | d <| S( uG Send a message to an XMPP user .. code-block:: yaml server-warning-message: xmpp.send_msg: - name: 'This is a server warning message' - profile: my-xmpp-account - recipient: admins@xmpp.example.com/salt name The message to send to the XMPP user u nameu changesu resultu u commentu testu Need to send message to {0}: {1}u xmpp.send_msg_multit messaget recipientst profileu Sent message to {0}: {1}N( t Nonet __opts__t formatR t True( t namet recipientR t ret( ( s4 /usr/lib/python2.7/site-packages/salt/states/xmpp.pyt send_msg s c C@ s� i | d 6i d 6d d 6d d 6} | d k rH | d k rH d | d <| Sd } | rj | d j | � 7} n | r� | d j | � 7} n | d j | � 7} t d r� d | | d <| St d d | d | d | d | � t | d <d | | d <| S( u� Send a message to an list of recipients or rooms .. code-block:: yaml server-warning-message: xmpp.send_msg: - name: 'This is a server warning message' - profile: my-xmpp-account - recipients: - admins@xmpp.example.com/salt - rooms: - qa@conference.xmpp.example.com name The message to send to the XMPP user u nameu changesu resultu u commentu/ Recipients and rooms are empty, no need to sendu users {0}u rooms {0}u , message: {0}u testu Need to sendu xmpp.send_msg_multiR R t roomsR u Sent message toN( R R R R R ( R R R R R t comment( ( s4 /usr/lib/python2.7/site-packages/salt/states/xmpp.pyt send_msg_multiB s0 N( t __doc__t __future__R R R R R R R ( ( ( s4 /usr/lib/python2.7/site-packages/salt/states/xmpp.pyt <module> s %