Package buildbot :: Module buildslave :: Class AbstractLatentBuildSlave
[frames] | no frames]

Class AbstractLatentBuildSlave

source code

            twisted.spread.pb.Avatar --+        
                                       |        
               pbutil.NewCredPerspective --+    
                                           |    
 twisted.application.service.Service --+   |    
                                       |   |    
twisted.application.service.MultiService --+    
                                           |    
                          AbstractBuildSlave --+
                                               |
                                              AbstractLatentBuildSlave

A build slave that will start up a slave instance when needed.

To use, subclass and implement start_instance and stop_instance.

See ec2buildslave.py for a concrete example. Also see the stub example in test/test_slaves.py.

Instance Methods
 
__init__(self, name, password, max_builds=None, notify_on_missing=[], missing_timeout=1200, build_wait_timeout=600, properties={}) source code
 
start_instance(self) source code
 
stop_instance(self, fast=False) source code
 
substantiate(self, sb) source code
 
attached(self, bot)
This is called when the slave connects.
source code
 
detached(self, mind) source code
 
buildStarted(self, sb) source code
 
buildFinished(self, sb) source code
 
insubstantiate(self, fast=False) source code
 
disconnect(self)
Forcibly disconnect the slave.
source code
 
stopService(self) source code
 
updateSlave(self)
Called to add or remove builders after the slave has connected.
source code
 
sendBuilderList(self) source code

Inherited from AbstractBuildSlave: __repr__, addSlaveBuilder, canStartBuild, messageReceivedFromSlave, perspective_keepalive, removeSlaveBuilder, setBotmaster, shutdown, startMissingTimer, stopMissingTimer, update, updateSlaveStatus

Inherited from twisted.spread.pb.Avatar: __providedBy__, perspectiveMessageReceived

Inherited from twisted.application.service.MultiService: __iter__, addService, getServiceNamed, privilegedStartService, removeService, startService

Inherited from twisted.application.service.Service: __getstate__, disownServiceParent, setName, setServiceParent

Class Variables
  substantiated = False
  substantiation_deferred = None
  build_wait_timer = None
  __implemented__ = <implementedBy buildbot.buildslave.AbstractL...
  __provides__ = <zope.interface.declarations.ClassProvides obje...

Inherited from twisted.application.service.Service: name, parent, running

Method Details

__init__(self, name, password, max_builds=None, notify_on_missing=[], missing_timeout=1200, build_wait_timeout=600, properties={})
(Constructor)

source code 
Parameters:
  • name - botname this machine will supply when it connects
  • password - password this machine will supply when it connects
  • max_builds - maximum number of simultaneous builds that will be run concurrently on this buildslave (the default is None for no limit)
  • properties - properties that will be applied to builds run on this slave
Overrides: twisted.application.service.MultiService.__init__

attached(self, bot)

source code 

This is called when the slave connects.

Returns:
a Deferred that fires with a suitable pb.IPerspective to give to the slave (i.e. 'self')
Overrides: pbutil.NewCredPerspective.attached

detached(self, mind)

source code 
Overrides: pbutil.NewCredPerspective.detached

disconnect(self)

source code 

Forcibly disconnect the slave.

This severs the TCP connection and returns a Deferred that will fire (with None) when the connection is probably gone.

If the slave is still alive, they will probably try to reconnect again in a moment.

This is called in two circumstances. The first is when a slave is removed from the config file. In this case, when they try to reconnect, they will be rejected as an unknown slave. The second is when we wind up with two connections for the same slave, in which case we disconnect the older connection.

Overrides: AbstractBuildSlave.disconnect
(inherited documentation)

stopService(self)

source code 
Overrides: twisted.application.service.Service.stopService

updateSlave(self)

source code 

Called to add or remove builders after the slave has connected.

Also called after botmaster's builders are initially set.

Returns:
a Deferred that indicates when an attached slave has accepted the new builders and/or released the old ones.
Overrides: AbstractBuildSlave.updateSlave

sendBuilderList(self)

source code 
Overrides: AbstractBuildSlave.sendBuilderList

Class Variable Details

__implemented__

Value:
<implementedBy buildbot.buildslave.AbstractLatentBuildSlave>

__provides__

Value:
<zope.interface.declarations.ClassProvides object at 0x105b5d0>