Package buildbot :: Package status :: Module buildset
[frames] | no frames]

Source Code for Module buildbot.status.buildset

 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  from zope.interface import implements 
17  from buildbot import interfaces 
18  from buildbot.status.buildrequest import BuildRequestStatus 
19   
20 -class BuildSetStatus:
21 implements(interfaces.IBuildSetStatus) 22
23 - def __init__(self, bsdict, status):
24 self.id = bsdict['bsid'] 25 self.bsdict = bsdict 26 self.status = status 27 self.master = status.master
28 29 # methods for our clients 30
31 - def getReason(self):
32 return self.bsdict['reason']
33
34 - def getResults(self):
35 return self.bsdict['results']
36
37 - def getID(self):
38 return self.bsdict['external_idstring']
39
40 - def isFinished(self):
41 return self.bsdict['complete']
42
44 # returns a Deferred; undocumented method that may be removed 45 # without warning 46 d = self.master.db.buildrequests.getBuildRequests(bsid=self.id) 47 def get_objects(brdicts): 48 return dict([ 49 (brd['buildername'], BuildRequestStatus(brd['buildername'], 50 brd['brid'], self.status)) 51 for brd in brdicts ])
52 d.addCallback(get_objects) 53 return d
54
55 - def getBuilderNames(self):
56 d = self.master.db.buildrequests.getBuildRequests(bsid=self.id) 57 def get_names(brdicts): 58 return sorted([ brd['buildername'] for brd in brdicts ])
59 d.addCallback(get_names) 60 return d 61
62 - def waitUntilFinished(self):
63 return self.status._buildset_waitUntilFinished(self.id)
64