Meego Wiki
Views

Buildservice API

From MeeGo wiki
Jump to: navigation, search


buildservice index /usr/lib/python2.7/site-packages/buildservice/__init__.py

  1. buildservice.py - Buildservice API support for Yabsc


Package Contents



Classes


__builtin__.object

   ProjectFlags

BuildService metafile


class BuildService

   	Interface to Build Service API

 	Methods defined here:

__init__(self, apiurl=None, oscrc=None)

abortBuild(self, project, package=None, target=None)

   abort(project, package=None, target=None)
    
   Abort build of a package or all packages in a project

deletePackage(self, project, package)

   deletePackage(project, package)
    
   Delete the specific package in project

deleteProject(self, project)

   deleteProject(project)
    
   Delete the specific project

genRequestInfo(self, reqid, show_detail=True)

gen_req_info(self, reqid, show_detail=True)

getAPIServerList(self)

   getAPIServerList() -> list
    
   Get list of API servers configured in .oscrc

getBinary(self, project, target, package, file, path)

   getBinary(project, target, file, path)
    
   Get binary 'file' for 'project' and 'target' and save it as 'path'

getBinaryList(self, project, target, package)

   getBinaryList(project, target, package) -> list
    
   Returns a list of binaries for a particular target and package

getBuildHistory(self, project, package, target)

   getBuildHistory(project, package, target) -> list
    
   Get build history of package for target as a list of tuples of the form
   (time, srcmd5, rev, versrel, bcnt)

getBuildLog(self, project, target, package, offset=0)

   getBuildLog(project, target, package, offset=0) -> str
    
   Returns the build log of a package for a particular target.
    
   If offset is greater than 0, return only text after that offset. This allows live streaming

getCommitLog(self, project, package, revision=None)

   getCommitLog(project, package, revision=None) -> list
    
   Get commit log for package in project. If revision is set, get just the
   log for that revision.
    
   Each log is a tuple of the form (rev, srcmd5, version, time, user,
   comment)

getDiff(self, sprj, spkg, dprj, dpkg, rev)

getLinkinfo(self, project, package, revision=None)

   getLinkinfo(project, package, revision=None) -> (linked_prj, linked_pkg, linked_srcmd5)
   returns link info of a prj/pkg

getPackageChecksum(self, project, package, revision=None)

   getPackageChecksum(project, package, revision=None) -> string
   returns srcmd5 of a package

getPackageData(self, project, package, tag)

   getPackageData(project, package, tag) -> list
    
   Return a string list if node has text, else return the values dict list

getPackageDevel(self, project, package)

   getPackageDevel(project, package) -> tuple (devel_prj, devel_pkg)
    
   Return the devel tuple of a package if it has the node, else return None

getPackageList(self, prj, deleted=None)

getPackageMeta(self, project, package)

   getPackageMeta(project, package) -> string
    
   Get XML metadata for package in project

getPackagePersons(self, project, package, role)

   getPackagePersons(project, package, role) -> list
    
   Return a userid list in the package with this role

getPackageStatus(self, project, package)

   getPackageStatus(project, package) -> dict
    
   Returns the status of a package as a dict with targets as the keys and status codes as the
   values

getProjectData(self, project, tag)

   getProjectData(project, tag) -> list
    
   Return a string list if node has text, else return the values dict list

getProjectDevel(self, project)

   getProjectDevel(project) -> tuple (devel_prj, devel_pkg)
    
   Return the devel tuple of a project if it has the node, else return None

getProjectDiff(self, src_project, dst_project)

getProjectLink(self, project)

   getProjectLink(project) -> string
    
   Return the linked project of a project if it has the node, else return None

getProjectList(self)

   getProjectList() -> list
    
   Get list of projects

getProjectMeta(self, project)

   getProjectMeta(project) -> string
    
   Get XML metadata for project

getProjectPersons(self, project, role)

   getProjectPersons(project, role) -> list
    
   Return a userid list in this project with this role

getRepoState(self, project)

getResults(self, project)

   getResults(project) -> (dict, list)
    
   Get results of a project. Returns (results, targets)
    
   results is a dict, with package names as the keys, and lists of result codes as the values
    
   targets is a list of targets, corresponding to the result code lists

getSrcFileChecksum(self, project, package, path, revision=None)

   getSrcFileChecksum(project, package, path, revision=None) -> string
   returns source md5 of a source file

getSrcFileContent(self, project, package, path, revision=None)

   Cat remote file

getSrcFileList(self, project, package, revision=None)

   get source file list of prj/pac

getSubmitRequests(self)

   getSubmitRequests() -> list of dicts

getTargets(self, project)

   getTargets(project) -> list
    
   Get a list of targets for a project

getUserData(self, user, *tags)

   getUserData() -> str
    
   Get the user data

getUserName(self)

   getUserName() -> str
    
   Get the user name associated with the current API server

getWaitStats(self)

   getWaitStats() -> list
    
   Returns the number of jobs in the wait queue as a list of (arch, count)
   pairs

getWatchedProjectList(self)

   getWatchedProjectList() -> list
    
   Get list of watched projects

getWorkerStatus(self)

   getWorkerStatus() -> list of dicts
    
   Get worker status as a list of dictionaries. Each dictionary contains the keys 'id',
   'hostarch', and 'status'. If the worker is building, the dict will additionally contain the
   keys 'project', 'package', 'target', and 'starttime'

isNewPackage(self, dst_project, dst_package)

is_new_package(self, dst_project, dst_package)

   # the following two alias api are added temporarily for compatible safe

projectFlags(self, project)

   projectFlags(project) -> ProjectFlags
    
   Return a ProjectFlags object for manipulating the flags of project

rebuild(self, project, package, target=None, code=None)

   rebuild(project, package, target, code=None)
    
   Rebuild 'package' in 'project' for 'target'. If 'code' is specified,
   all targets with that code will be rebuilt

reqAccept(self, reqid, msg=)

   This method is called to accept a request
   Success: return None
   Failed:  return string of error message

reqDecline(self, reqid, msg=)

   This method is called to decline a request
   Success: return None
   Failed:  return string of error message

reqReview(self, reqid, user=, group=, msg=)

   This method is called to add review msg to a request
   Success: return None
   Failed:  return string of error message

reqRevoke(self, reqid, msg=)

   This method is called to revoke a request
   Success: return None
   Failed:  return string of error message

unwatchProject(self, project)

   watchProject(project)
    
   Watch project

watchProject(self, project)

   watchProject(project)
    
   Watch project


class ProjectFlags(__builtin__.object)

   	ProjectFlags(bs, project)

Represents the flags in project through the BuildService object bs

 	Methods defined here:

__init__(self, bs, project)

save(self)

   save()
    
   Save flags

Data descriptors defined here:

__dict__

   dictionary for instance variables (if defined)

__weakref__

   list of weak references to the object (if defined)


class metafile

   	metafile(url, input, change_is_required=False, file_ext='.xml')

Implementation on osc.core.metafile that does not print to stdout

 	Methods defined here:

__init__(self, url, input, change_is_required=False, file_ext='.xml')

sync(self)


Functions


bool2flag(b)

   bool2flag(b) -> String
    
   Returns 'enable', or 'disable' according to boolean value b

flag2bool(flag)

   flag2bool(flag) -> Boolean
    
   Returns a boolean corresponding to the string 'enable', or 'disable'
Personal tools