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

Class AbstractLatentBuildSlave

source code

       config.ReconfigurableServiceMixin --+    
                                           |    
                twisted.spread.pb.Avatar --+    
                                           |    
 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={}, locks=None) source code
 
start_instance(self, build) source code
 
stop_instance(self, fast=False) source code
 
substantiate(self, sb, build) 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)
This is called when a build on this slave is finished.
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
 
__provides__(...)
Special descriptor for class __provides__

Inherited from AbstractBuildSlave: __repr__, acquireLocks, addSlaveBuilder, canStartBuild, doKeepalive, findNewSlaveInstance, getPerspective, isConnected, locksAvailable, maybeShutdown, messageReceivedFromSlave, perspective_keepalive, perspective_shutdown, reconfigService, releaseLocks, removeSlaveBuilder, shutdown, startKeepaliveTimer, startMissingTimer, startService, stopKeepaliveTimer, stopMissingTimer, subscribeToDetach, updateLocks, updateSlaveStatus

Inherited from config.ReconfigurableServiceMixin: __providedBy__

Inherited from twisted.spread.pb.Avatar: perspectiveMessageReceived

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

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

Class Variables
  substantiated = False
  substantiation_deferred = None
hash(x)
  substantiation_build = None
hash(x)
  build_wait_timer = None
hash(x)
  __implemented__ = <implementedBy buildbot.buildslave.AbstractL...

Inherited from AbstractBuildSlave: keepalive_interval, keepalive_timer, reconfig_priority

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={}, locks=None)
(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
  • locks - A list of locks that must be acquired before this slave can be used
Overrides: twisted.application.service.MultiService.__init__

attached(self, bot)

source code 

This is called when the slave connects.

Returns:
a Deferred that fires when the attachment is complete
Overrides: AbstractBuildSlave.attached
(inherited documentation)

detached(self, mind)

source code 
Overrides: AbstractBuildSlave.detached

buildFinished(self, sb)

source code 

This is called when a build on this slave is finished.

Overrides: AbstractBuildSlave.buildFinished
(inherited documentation)

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

__provides__(...)

 
Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that
we can get declarations for objects without instance-specific
interfaces a bit quicker.

For example:

  >>> from zope.interface import Interface
  >>> class IFooFactory(Interface):
  ...     pass
  >>> class IFoo(Interface):
  ...     pass
  >>> class C(object):
  ...     implements(IFoo)
  ...     classProvides(IFooFactory)
  >>> [i.getName() for i in C.__provides__]
  ['IFooFactory']

  >>> [i.getName() for i in C().__provides__]
  ['IFoo']

Overrides: twisted.application.service.Service.__provides__

Class Variable Details

__implemented__

Value:
<implementedBy buildbot.buildslave.AbstractLatentBuildSlave>