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

Class AbstractBuildSlave

source code

            twisted.spread.pb.Avatar --+    
                                       |    
               pbutil.NewCredPerspective --+
                                           |
 twisted.application.service.Service --+   |
                                       |   |
twisted.application.service.MultiService --+
                                           |
                                          AbstractBuildSlave
Known Subclasses:

This is the master-side representative for a remote buildbot slave. There is exactly one for each slave described in the config file (the c['slaves'] list). When buildbots connect in (.attach), they get a reference to this instance. The BotMaster object is stashed as the .botmaster attribute. The BotMaster is also our '.parent' Service.

I represent a build slave -- a remote machine capable of running builds. I am instantiated by the configuration file, and can be subclassed to add extra functionality.

Instance Methods
 
__init__(self, name, password, max_builds=None, notify_on_missing=[], missing_timeout=3600, properties={}) source code
 
update(self, new)
Given a new BuildSlave, configure this one identically.
source code
 
__repr__(self) source code
 
setBotmaster(self, botmaster) source code
 
stopMissingTimer(self) source code
 
startMissingTimer(self) source code
 
updateSlave(self)
Called to add or remove builders after the slave has connected.
source code
 
updateSlaveStatus(self, buildStarted=None, buildFinished=None) source code
 
attached(self, bot)
This is called when the slave connects.
source code
 
messageReceivedFromSlave(self) source code
 
detached(self, mind) source code
 
disconnect(self)
Forcibly disconnect the slave.
source code
 
sendBuilderList(self) source code
 
perspective_keepalive(self) source code
 
addSlaveBuilder(self, sb) source code
 
removeSlaveBuilder(self, sb) source code
 
canStartBuild(self)
I am called when a build is requested to see if this buildslave can start a build.
source code
 
shutdown(self)
Shutdown the slave
source code

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

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

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

Class Variables
  __implemented__ = <implementedBy buildbot.buildslave.AbstractB...
  __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=3600, 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 (dictionary) - properties that will be applied to builds run on this slave
Overrides: twisted.application.service.MultiService.__init__

update(self, new)

source code 

Given a new BuildSlave, configure this one identically. Because BuildSlave objects are remotely referenced, we can't replace them without disconnecting the slave, yet there's no reason to do that.

updateSlave(self)

source code 

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

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

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.

canStartBuild(self)

source code 

I am called when a build is requested to see if this buildslave can start a build. This function can be used to limit overall concurrency on the buildslave.


Class Variable Details

__implemented__

Value:
<implementedBy buildbot.buildslave.AbstractBuildSlave>

__provides__

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