Package buildbot :: Module libvirtbuildslave :: Class LibVirtSlave
[frames] | no frames]

Class LibVirtSlave

source code

       config.ReconfigurableServiceMixin --+        
                                           |        
                twisted.spread.pb.Avatar --+        
                                           |        
 twisted.application.service.Service --+   |        
                                       |   |        
twisted.application.service.MultiService --+        
                                           |        
               buildslave.AbstractBuildSlave --+    
                                               |    
             buildslave.AbstractLatentBuildSlave --+
                                                   |
                                                  LibVirtSlave

Instance Methods
 
__init__(self, name, password, connection, hd_image, base_image=None, xml=None, max_builds=None, notify_on_missing=[], missing_timeout=60*20, build_wait_timeout=60*10, properties={}, locks=None) source code
 
start_instance(self, build)
I start a new instance of a VM.
source code
 
stop_instance(self, fast=False)
I attempt to stop a running VM.
source code
 
buildFinished(self, *args, **kwargs)
I insubstantiate a slave after it has done a build, if that is desired behaviour.
source code

Inherited from buildslave.AbstractLatentBuildSlave: __provides__, attached, buildStarted, detached, disconnect, insubstantiate, sendBuilderList, stopService, substantiate, updateSlave

Inherited from buildslave.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

Inherited from buildslave.AbstractLatentBuildSlave: __implemented__, build_wait_timer, substantiated, substantiation_build, substantiation_deferred

Inherited from buildslave.AbstractBuildSlave: keepalive_interval, keepalive_timer, reconfig_priority

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

Method Details

__init__(self, name, password, connection, hd_image, base_image=None, xml=None, max_builds=None, notify_on_missing=[], missing_timeout=60*20, build_wait_timeout=60*10, 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__

start_instance(self, build)

source code 

I start a new instance of a VM.

If a base_image is specified, I will make a clone of that otherwise i will use image directly.

If i'm not given libvirt domain definition XML, I will look for my name in the list of defined virtual machines and start that.

Overrides: buildslave.AbstractLatentBuildSlave.start_instance

stop_instance(self, fast=False)

source code 

I attempt to stop a running VM. I make sure any connection to the slave is removed. If the VM was using a cloned image, I remove the clone When everything is tidied up, I ask that bbot looks for work to do

Overrides: buildslave.AbstractLatentBuildSlave.stop_instance

buildFinished(self, *args, **kwargs)

source code 

I insubstantiate a slave after it has done a build, if that is desired behaviour.

Overrides: buildslave.AbstractBuildSlave.buildFinished