summaryrefslogtreecommitdiff
path: root/obsapi/core.py
diff options
context:
space:
mode:
Diffstat (limited to 'obsapi/core.py')
-rw-r--r--obsapi/core.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/obsapi/core.py b/obsapi/core.py
index 26b7b7e..2baf072 100644
--- a/obsapi/core.py
+++ b/obsapi/core.py
@@ -8,6 +8,7 @@ from obsapi.sourceapi import ObsSourceApi
from obsapi.buildapi import ObsBuildApi
from obsapi.repoflags import RepoFlags
from obsapi.fileinfo import FileInfo
+from obsapi.jobhist import JobHist
from .null import Null
@@ -411,3 +412,18 @@ class ObsApi(object):
params['cmd'] = 'remove_flag'
return self.source.post(prj, pkg, **params)
+
+ def get_jobhistory_list(self, prj, repo, arch, package=None, code=None, limit=None):
+ '''Get build job history for packages in project
+
+ :param prj: OBS Project
+ :param repo: OBS Repository
+ "param arch: Architecture
+ :param package: OBS Package (optional, limit result to this package)
+ :param limit: Number of jot histories to limit to (optional)
+
+ :returns: List of JobHist objects
+ '''
+ xml = self.build.get_jobhistory(prj, repo, arch, pkg=package, code=code, limit=limit)
+ root = xml2etree(xml)
+ return [JobHist(jh) for jh in root.findall('jobhist')]