<html lang="en"> <head> <title>Writing New Latent Buildslaves - BuildBot Manual - 0.8.4p1</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="BuildBot Manual - 0.8.4p1"> <meta name="generator" content="makeinfo 4.13"> <link title="Top" rel="start" href="index.html#Top"> <link rel="up" href="Latent-Buildslaves.html#Latent-Buildslaves" title="Latent Buildslaves"> <link rel="prev" href="Dangers-with-Latent-Buildslaves.html#Dangers-with-Latent-Buildslaves" title="Dangers with Latent Buildslaves"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <!-- This is the BuildBot manual for Buildbot version 0.8.4p1. Copyright (C) 2005, 2006, 2009, 2010 Brian Warner Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.--> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <div class="node"> <a name="Writing-New-Latent-Buildslaves"></a> <p> Previous: <a rel="previous" accesskey="p" href="Dangers-with-Latent-Buildslaves.html#Dangers-with-Latent-Buildslaves">Dangers with Latent Buildslaves</a>, Up: <a rel="up" accesskey="u" href="Latent-Buildslaves.html#Latent-Buildslaves">Latent Buildslaves</a> <hr> </div> <h5 class="subsubsection">4.9.3.4 Writing New Latent Buildslaves</h5> <p>Writing a new latent buildslave should only require subclassing <code>buildbot.buildslave.AbstractLatentBuildSlave</code> and implementing start_instance and stop_instance. <pre class="example"> def start_instance(self): # responsible for starting instance that will try to connect with this # master. Should return deferred. Problems should use an errback. The # callback value can be None, or can be an iterable of short strings to # include in the "substantiate success" status message, such as # identifying the instance that started. raise NotImplementedError def stop_instance(self, fast=False): # responsible for shutting down instance. Return a deferred. If `fast`, # we're trying to shut the master down, so callback as soon as is safe. # Callback value is ignored. raise NotImplementedError </pre> <p>See <code>buildbot.ec2buildslave.EC2LatentBuildSlave</code> for an example. </body></html>