Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/landscape/monitor/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/landscape/monitor/service.pyc


Tc@sdZddlZddlmZddlmZmZddlmZddl	m
Z
ddlmZddl
mZd	efd
YZdZdS(s Deployment code for the monitor.iN(t
namedClass(tLandscapeServicetrun_landscape_service(tMonitorConfiguration(tMonitor(tRemoteBrokerConnector(tComponentPublishertMonitorServicecBs;eZdZejZdZdZdZdZ	RS(so
    The core Twisted Service which creates and runs all necessary monitoring
    components when started.
    cCstjj|jd|j|_tt|j||j	|_
t|j|j
|jd|j|_t|j|j|j
|_dS(Ns
%s.bpickletpersist_filename(tostpathtjoint	data_pathtservice_nameRtsuperRt__init__tget_pluginstpluginsRtreactortconfigtpersisttmonitorRt	publisher(tselfR((s=/usr/lib/python2.7/dist-packages/landscape/monitor/service.pyRs	cCs6g|jjD]%}td|j|f^q
S(Nslandscape.monitor.%s.%s(Rtplugin_factoriesRtlower(Rtplugin_name((s=/usr/lib/python2.7/dist-packages/landscape/monitor/service.pyR scscttjjjfd}tjj_jj	}|j
|S(sStart the monitor.csL|_|j_x!jD]}jj|qWjjjS(N(tbrokerRRtaddtregister_clientR
(Rtplugin(R(s=/usr/lib/python2.7/dist-packages/landscape/monitor/service.pyt
start_plugins*s
	(RRtstartServiceRtstartRRRt	connectortconnecttaddCallback(RRt	connected((Rs=/usr/lib/python2.7/dist-packages/landscape/monitor/service.pyR %s
cCs>|jj|jj|jjtt|jdS(sStop the monitor.

        The monitor is flushed to ensure that things like persist databases
        get saved to disk.
        N(	RtstopRtflushR"t
disconnectRRtstopService(R((s=/usr/lib/python2.7/dist-packages/landscape/monitor/service.pyR)5s


(
t__name__t
__module__t__doc__RtnameR
RRR R)(((s=/usr/lib/python2.7/dist-packages/landscape/monitor/service.pyRs		
		cCsttt|dS(N(RRR(targs((s=/usr/lib/python2.7/dist-packages/landscape/monitor/service.pytrunAs(R,R	ttwisted.python.reflectRtlandscape.serviceRRtlandscape.monitor.configRtlandscape.monitor.monitorRtlandscape.broker.ampRt
landscape.ampRRR/(((s=/usr/lib/python2.7/dist-packages/landscape/monitor/service.pyt<module>s3