Your IP : 172.28.240.42


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

ó
ÍÿŠTc@s‰ddlmZddlmZmZddlmZddlmZddl	m
Z
ddlmZdefd„ƒYZ
d	„Zd
S(iÿÿÿÿ(t
namedClass(tLandscapeServicetrun_landscape_service(tManagerConfiguration(tRemoteBrokerConnector(tComponentPublisher(tManagertManagerServicecBs;eZdZejZd„Zd„Zd„Zd„Z	RS(sm
    The core Twisted Service which creates and runs all necessary managing
    components when started.
    cCs_tt|ƒj|ƒ|jƒ|_t|j|jƒ|_t	|j|j|jƒ|_
dS(N(tsuperRt__init__tget_pluginstpluginsRtreactortconfigtmanagerRt	publisher(tselfR
((s=/usr/lib/python2.7/dist-packages/landscape/manager/service.pyR	s
cCs6g|jjD]%}td|jƒ|fƒƒ^q
S(sAReturn instances of all the plugins enabled in the configuration.slandscape.manager.%s.%s(R
tplugin_factoriesRtlower(Rtplugin_name((s=/usr/lib/python2.7/dist-packages/landscape/manager/service.pyR
scscttˆƒjƒˆjjƒ‡fd†}tˆjˆjƒˆ_ˆjj	ƒ}|j
|ƒS(sStart the manager service.

        This method does 3 things, in this order:

          - Start listening for connections on the manager socket.
          - Connect to the broker.
          - Add all configured plugins, that will in turn register themselves.
        csL|ˆ_|ˆj_x!ˆjD]}ˆjj|ƒqWˆjjˆjƒS(N(tbrokerRRtaddtregister_clienttservice_name(Rtplugin(R(s=/usr/lib/python2.7/dist-packages/landscape/manager/service.pyt
start_plugins+s
	(RRtstartServiceRtstartRRR
t	connectortconnecttaddCallback(RRt	connected((Rs=/usr/lib/python2.7/dist-packages/landscape/manager/service.pyRs	
cCs1|jjƒ|jjƒtt|ƒjƒdS(s:Stop the manager and close the connection with the broker.N(Rt
disconnectRtstopRRtstopService(R((s=/usr/lib/python2.7/dist-packages/landscape/manager/service.pyR"6s

(
t__name__t
__module__t__doc__RtnameRR	R
RR"(((s=/usr/lib/python2.7/dist-packages/landscape/manager/service.pyR
s				cCsttt|ƒdS(N(RRR(targs((s=/usr/lib/python2.7/dist-packages/landscape/manager/service.pytrun=sN(ttwisted.python.reflectRtlandscape.serviceRRtlandscape.manager.configRtlandscape.broker.ampRt
landscape.ampRtlandscape.manager.managerRRR((((s=/usr/lib/python2.7/dist-packages/landscape/manager/service.pyt<module>s3