Warning

Client version 2 is obsolete, please use Client version 3 instead.

Resources

Project

see entity attributes at Project entity attributes.

class copr.client_v2.resources.Project(entity, handle, **kwargs)[source]
update()[source]

Updates project using the current state.

Shortcut for for ProjectHandle.update()

Return type

OperationResult

delete()[source]

Updates project using the current state

Return type

OperationResult

get_self()[source]

Retrieves fresh project object from the service

Return type

Project

get_builds(**query_options)[source]

Get builds owned by this project

Parameters

query_options – see handlers.BuildHandle.get_list()

Return type

BuildsList

get_build_tasks(**query_options)[source]

Get build tasks owned by this project

Parameters

query_options – see handlers.BuildHandle.get_list()

Return type

BuildTasksList

get_project_chroot(name)[source]

Retrieves project chroot object by the given name

Parameters

name (str) – mock chroot name

Return type

ProjectChroot

get_project_chroot_list()[source]

Retrieves project chroots list

Return type

ProjectChrootList

enable_project_chroot(name)[source]

Enables given chroot for this project

Shortcut for for ProjectChrootHandle.enable()

Parameters

name (str) – mock chroot name

Return type

OperationResult

create_build_from_file(*args, **kwargs)[source]

Shortcut for BuildHandle.create_from_file() (here you don’t need to specify project_id)

create_build_from_url(*args, **kwargs)[source]

Shortcut for BuildHandle.create_from_file() (here you don’t need to specify project_id)

class copr.client_v2.resources.ProjectList(handle, **kwargs)[source]
next_page()[source]

Retrieves next chunk of the Project list for the same query options

Return type

ProjectList

property projects
Return type

list of Project

Project chroot

see entity attributes at Project chroot entity attributes.

class copr.client_v2.resources.ProjectChroot(entity, handle, project, **kwargs)[source]
disable()[source]

Disables chroot for the bound project

Return type

OperationResult

update()[source]

Updates chroot with the current entity state

Return type

OperationResult

class copr.client_v2.resources.ProjectChrootList(handle, project, **kwargs)[source]

List of the ProjectChroot in the one Project.

property chroots
Return type

list of ProjectChroot

enable(name)[source]

Enables mock chroot for the current project

Return type

OperationResult

Build

see entity attributes at Build entity attributes.

class copr.client_v2.resources.Build(entity, handle, **kwargs)[source]
get_self()[source]

Retrieves fresh build object from the service

Return type

Build

cancel()[source]

Updates the current build

Return type

OperationResult

delete()[source]

Deletes the current build

Return type

OperationResult

get_build_tasks(**query_options)[source]

Get build tasks owned by this build

Parameters

query_options – see handlers.BuildHandle.get_list()

Return type

BuildTasksList

class copr.client_v2.resources.BuildList(handle, **kwargs)[source]
next_page()[source]

Retrieves next chunk of the Build list for the same query options

Return type

BuildList

property builds
Return type

BuildList

Build task

see entity attributes at Build task entity attributes.

class copr.client_v2.resources.BuildTask(entity, handle, **kwargs)[source]
get_self()[source]

Retrieves fresh build task object from the service

Return type

Build

class copr.client_v2.resources.BuildTaskList(handle, **kwargs)[source]

List of build tasks

property build_tasks
Return type

list of BuildTask

Mock chroot

see entity attributes at Mock chroot entity attributes.

class copr.client_v2.resources.MockChroot(entity, handle, **kwargs)[source]
class copr.client_v2.resources.MockChrootList(handle, **kwargs)[source]

List of the mock chroots supported by the service

property chroots
Return type

list of MockChroot

Operation result

class copr.client_v2.resources.OperationResult(handle, response=None, entity=None, options=None, expected_status=200)[source]

Fake resource to represent results of the requested operation

property new_location

Contains an url to the new location produced by an operation If operation doesn’t produce a new location would contain None

Return type

str

is_successful()[source]

Performs check if status code is equal to the expected value of particular request.

Return type

bool