%PDF- %PDF-
Direktori : /lib/python2.7/site-packages/salt/beacons/ |
Current File : //lib/python2.7/site-packages/salt/beacons/glxinfo.pyc |
� ���^c @@ s~ d Z d d l m Z m Z d d l Z d d l Z d d l m Z e j e � Z d Z i Z d � Z d � Z d � Z d S( u[ Beacon to emit when a display is available to a linux machine .. versionadded:: 2016.3.0 i ( t absolute_importt unicode_literalsN( t mapu glxinfoc C@ s- t j j j d � } | d k r% t St Sd S( Nu glxinfo( t saltt utilst patht whicht Nonet Falset __virtualname__( t which_result( ( s8 /usr/lib/python2.7/site-packages/salt/beacons/glxinfo.pyt __virtual__ s c C@ sU t | t � s t d f Si } t t | j | � � d | k rK t d f St d f S( u+ Validate the beacon configuration u0 Configuration for glxinfo beacon must be a list.u useruY Configuration for glxinfo beacon must include a user as glxinfo is not available to root.u Valid beacon configuration( t isinstancet listR R t updatet True( t configt _config( ( s8 /usr/lib/python2.7/site-packages/salt/beacons/glxinfo.pyt validate s c C@ s� t j d � g } i } t t | j | � � t d d d | d d t �} d | k r� | d r� t j d t � } | d k } | | k s� d t k r� | j i d d 6| d 6� n | t d <n | S( u Emit the status of a connected display to the minion Mainly this is used to detect when the display fails to connect for whatever reason. .. code-block:: yaml beacons: glxinfo: - user: frank - screen_event: True u glxinfo beacon startingu cmd.retcodeu DISPLAY=:0 glxinfot runasu usert python_shellu screen_eventu screen_availablei u tag( t logt traceR R R t __salt__R t last_statet getR t append( R t retR t retcodet last_valuet screen_available( ( s8 /usr/lib/python2.7/site-packages/salt/beacons/glxinfo.pyt beacon1 s ( t __doc__t __future__R R t loggingt salt.utils.pathR t salt.ext.six.movesR t getLoggert __name__R R R R R R ( ( ( s8 /usr/lib/python2.7/site-packages/salt/beacons/glxinfo.pyt <module> s