Package copr :: Package client :: Module client :: Class CoprClient
[hide private]
[frames] | no frames]

Class CoprClient

source code


Instance Methods [hide private]
 
__init__(self, config=None)
Main interface to the copr service :param config: Configuration dictionary.
source code
 
__str__(self)
str(x)
source code
 
_fetch(self, url, data=None, projectname=None, method=None, skip_auth=False, on_error_response=None)
Fetch data from server, checks response and raises a CoprCliRequestException with nice error message or CoprCliUnknownResponseException in case of some some error.
source code
 
get_build_status(self, build_id) source code
 
get_build_details(self, build_id) source code
 
cancel_build(self, build_id) source code
 
delete_project(self, projectname)
Delete the entire project
source code
 
get_project_details(self, projectname)
Get project details
source code
 
create_project(self, projectname, description=None, instructions=None, chroots=None, repos=None, initial_pkgs=None)
Create a new copr project
source code
 
get_projects_list(self, username=None)
Get list of projects created by the user
source code
 
get_project_chroot_details(self, name, chroot) source code
 
modify_project_chroot_details(self, projectname, chroot, pkgs=None) source code
 
modify_project(self, projectname, description=None, instructions=None, repos=None)
Modifies main project settings.
source code
 
create_new_build(self, projectname, pkgs, timeout=None, memory=None, chroots=None)
Creates new build in `projectname` copr.
source code
 
search_projects(self, query) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Static Methods [hide private]
 
create_from_file_config(filepath=None)
Retrieve copr client information from the config file.
source code
Properties [hide private]
  api_url

Inherited from object: __class__

Method Details [hide private]

__init__(self, config=None)
(Constructor)

source code 

Main interface to the copr service :param config: Configuration dictionary. Fields: copr_url - copr service location login - user login, used for identification token - copr api token username - used as copr projects root

Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

create_from_file_config(filepath=None)
Static Method

source code 

Retrieve copr client information from the config file. :param filepath: specifies config location, default: "~/.config/copr"

_fetch(self, url, data=None, projectname=None, method=None, skip_auth=False, on_error_response=None)

source code 

Fetch data from server, checks response and raises a CoprCliRequestException with nice error message or CoprCliUnknownResponseException in case of some some error. Otherwise return json object.

:param url: formed url to fetch :param data: serialised data to send :param skip_auth: don't send auth credentials :param projectname: name of the copr project :param on_error_response: function to handle responses with bad status code

modify_project(self, projectname, description=None, instructions=None, repos=None)

source code 

Modifies main project settings.

:param projectname: :param description: :param instructions: :param repos: :return:

create_new_build(self, projectname, pkgs, timeout=None, memory=None, chroots=None)

source code 

Creates new build in `projectname` copr.

:param projectname: name of copr project (without user namespace) :param pkgs: list of packages to include in build :param timeout: ?build timeout :param memory: amount of required memory for build process :param wait: if True function wait for packages to be build :param chroots: build only with given chroots


Property Details [hide private]

api_url

Get Method:
unreachable.api_url(self)