| 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/ |
Upload File : |
ó
}9Rc @ sš d d l Z d d l Z d d l m Z m Z d d l m Z d d l m Z d d l m
Z
d d l m Z m
Z
d e e f d „ ƒ YZ d „ Z d S(
iÿÿÿÿN( t Applicationt Service( t startApplication( t rotate_logs( t LandscapeReactor( t get_versioned_persistt init_loggingt LandscapeServicec B s5 e Z d Z e Z d Z d „ Z d „ Z d „ Z RS( s Utility superclass for defining Landscape services.
This sets up the reactor and L{Persist} object.
@cvar service_name: The lower-case name of the service. This is used to
generate the bpickle and the Unix socket filenames.
@ivar config: A L{Configuration} object.
@ivar reactor: A L{LandscapeReactor} object.
@ivar persist: A L{Persist} object, if C{persist_filename} is defined.
@ivar factory: A L{LandscapeComponentProtocolFactory}, it must be provided
by instances of sub-classes.
c s³ | | _ y d d l m } Wn t k
r0 n X| j ƒ | j ƒ | _ | j re t | ƒ | _ n | j d k o} | j j s¯ d d l m ‰ t
j
t
j ‡ f d † ƒ n d S( Niÿÿÿÿ( t bpickle_dbus( t reactorc s
ˆ j t ƒ S( N( t callFromThreadR ( t signalt frame( R ( s5 /usr/lib/python2.7/dist-packages/landscape/service.pyt <lambda>+ s ( t configt
landscape.libR t ImportErrort installt reactor_factoryR t persist_filenameR t persistt Nonet ignore_sigusr1t twisted.internetR t SIGUSR1( t selfR R ( ( R s5 /usr/lib/python2.7/dist-packages/landscape/service.pyt __init__ s
c C s: t j | ƒ t j d | j j ƒ | j j ƒ f ƒ d S( Ns %s started with config %s( R t startServicet loggingt infot service_namet
capitalizeR t get_config_filename( R ( ( s5 /usr/lib/python2.7/dist-packages/landscape/service.pyR - s
c C s: t j | ƒ t j d | j j ƒ | j j ƒ f ƒ d S( Ns %s stopped with config %s( R t stopServiceR R R R R R ( R ( ( s5 /usr/lib/python2.7/dist-packages/landscape/service.pyR! 2 s
N(
t __name__t
__module__t __doc__R R R R R R R! ( ( ( s5 /usr/lib/python2.7/dist-packages/landscape/service.pyR s c s~ | ƒ ‰ ˆ j | ƒ t ˆ | j ƒ t d | j f ƒ ‰ | ˆ ƒ ‰ ˆ j ˆ ƒ ˆ j d k r>d d l m } d | _ g ‰ x„ t ˆ j ƒ D]s } ˆ j
ƒ } | j d | 7_ ˆ j | _
| j d | 7_ | j d | 7_ t | _ ˆ j | | ƒ ƒ q“ Wt ˆ _ ‡ ‡ ‡ ‡ f d † } ˆ j j | ƒ n t ˆ t ƒ ˆ j rmt j t j t j ƒ n ˆ j j ƒ d S(
s} Run a Landscape service.
This function instantiates the specified L{LandscapeService} subclass and
attaches the resulting service object to a Twisted C{Application}. After
that it starts the Twisted L{Application} and calls the
L{LandscapeReactor.run} method of the L{LandscapeService}'s reactor.
@param configuration_class: The service-specific subclass of
L{Configuration} used to parse C{args} and build the C{service_class}
object.
@param service_class: The L{LandscapeService} subclass to create and start.
@param args: Command line arguments used to initialize the configuration.
s landscape-%si iÿÿÿÿ( t MethodCallSenderi, s Clone %ds -clone-%dc sm t ˆ j ƒ } | ˆ j } xJ t ˆ ƒ D]<