| Server IP : 61.19.30.66 / Your IP : 216.73.216.15 Web Server : Apache/2.2.22 (Ubuntu) System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 User : www-data ( 33) PHP Version : 5.3.10-1ubuntu3.48 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python2.7/dist-packages/landscape/sysinfo/ |
Upload File : |
ó
}9Rc @ s¬ d d l Z d d l m Z d d l Z d d l Z d d l m Z d d l m Z d d l m
Z
d d l m Z d e f d „ ƒ YZ
d d d d d
d d d
„ Z d S( iÿÿÿÿN( t getLogger( t Failure( t gather_results( t log_failure( t PluginRegistryt SysInfoPluginRegistryc B sh e Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
d „ Z d
„ Z RS( sG
When the sysinfo plugin registry is run, it will run each of the
registered plugins so that they get a chance to feed information
into the registry.
There are three kinds of details collected: headers, notes, and footnotes.
They are presented to the user in a way similar to the following:
Header1: Value1 Header3: Value3
Header2: Value2 Header4: Value4
=> This is first note
=> This is the second note
The first footnote.
The second footnote.
Headers are supposed to display information which is regularly
available, such as the load and temperature of the system. Notes
contain eventual information, such as warnings of high temperatures,
and low disk space. Finally, footnotes contain pointers to further
information such as URLs.
c C sD t t | ƒ j ƒ i | _ g | _ g | _ g | _ t | _ d S( N( t superR t __init__t
_header_indext _headerst _notest
_footnotest Falset
_plugin_error( t self( ( s= /usr/lib/python2.7/dist-packages/landscape/sysinfo/sysinfo.pyR ' s c C sd | j j | ƒ } | d k rM t | j ƒ | j | <| j j | | f ƒ n | | f | j | <d S( sê Add a new information header to be displayed to the user.
Each header name is only present once. If a header is added
multiple times, the last value added will be returned in
the get_headers() call.
Headers with value None are not returned by get_headers(), but
they still allocate a position in the list. This fact may be
explored to create a deterministic ordering even when dealing
with values obtained asynchornously.
N( R t gett Nonet lenR t append( R t namet valuet index( ( s= /usr/lib/python2.7/dist-packages/landscape/sysinfo/sysinfo.pyt
add_header/ s
c C s* g | j D] } | d d k r
| ^ q
S( s› Get all information headers to be displayed to the user.
Headers which were added with value None are not included in
the result.
i N( R R ( R t pair( ( s= /usr/lib/python2.7/dist-packages/landscape/sysinfo/sysinfo.pyt get_headersB s c C s | j j | ƒ d S( s<