Package buildbot :: Package clients :: Module base
[frames] | no frames]

Source Code for Module buildbot.clients.base

 1  # This file is part of Buildbot.  Buildbot is free software: you can 
 2  # redistribute it and/or modify it under the terms of the GNU General Public 
 3  # License as published by the Free Software Foundation, version 2. 
 4  # 
 5  # This program is distributed in the hope that it will be useful, but WITHOUT 
 6  # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 
 7  # FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more 
 8  # details. 
 9  # 
10  # You should have received a copy of the GNU General Public License along with 
11  # this program; if not, write to the Free Software Foundation, Inc., 51 
12  # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 
13  # 
14  # Copyright Buildbot Team Members 
15   
16   
17  from twisted.spread import pb 
18   
19 -class StatusClient(pb.Referenceable):
20 """To use this, call my .connected method with a RemoteReference to the 21 buildmaster's StatusClientPerspective object. 22 """ 23
24 - def __init__(self, events):
25 self.builders = {} 26 self.events = events
27
28 - def connected(self, remote):
29 print "connected" 30 self.remote = remote 31 remote.callRemote("subscribe", self.events, 5, self)
32
33 - def remote_builderAdded(self, buildername, builder):
34 print "builderAdded", buildername
35
36 - def remote_builderRemoved(self, buildername):
37 print "builderRemoved", buildername
38
39 - def remote_builderChangedState(self, buildername, state, eta):
40 print "builderChangedState", buildername, state, eta
41
42 - def remote_buildStarted(self, buildername, build):
43 print "buildStarted", buildername
44
45 - def remote_buildFinished(self, buildername, build, results):
46 print "buildFinished", results
47
48 - def remote_buildETAUpdate(self, buildername, build, eta):
49 print "ETA", buildername, eta
50
51 - def remote_stepStarted(self, buildername, build, stepname, step):
52 print "stepStarted", buildername, stepname
53
54 - def remote_stepFinished(self, buildername, build, stepname, step, results):
55 print "stepFinished", buildername, stepname, results
56
57 - def remote_stepETAUpdate(self, buildername, build, stepname, step, 58 eta, expectations):
59 print "stepETA", buildername, stepname, eta
60
61 - def remote_logStarted(self, buildername, build, stepname, step, 62 logname, log):
63 print "logStarted", buildername, stepname
64
65 - def remote_logFinished(self, buildername, build, stepname, step, 66 logname, log):
67 print "logFinished", buildername, stepname
68
69 - def remote_logChunk(self, buildername, build, stepname, step, logname, log, 70 channel, text):
71 ChunkTypes = ["STDOUT", "STDERR", "HEADER"] 72 print "logChunk[%s]: %s" % (ChunkTypes[channel], text)
73