a *Na@sddlmZddlmZddlmZddlmZmZmZddl m Z m Z m Z m Z mZgdZGdddeZGd d d e eZGd d d ee eZGd dde eZGddde eZGddde eZGddde eZGddde eZdS))cli) exceptions)types)RequiredOptional RESTManager RESTObject) CRUDMixin ListMixin NoUpdateMixinObjectDeleteMixin SaveMixin) RunnerJobRunnerJobManagerRunner RunnerManager GroupRunnerGroupRunnerManager ProjectRunnerProjectRunnerManagerc@s eZdZdS)r N__name__ __module__ __qualname__rrt/private/var/folders/js/6pj4vh5d4zd0k6bxv74qrbhr0000gr/T/pip-target-22xwyzbs/lib/python/gitlab/v4/objects/runners.pyr sr c@s eZdZdZeZddiZdZdS)rz/runners/%(runner_id)s/jobs runner_idid)statusN)rrr_pathr _obj_cls_from_parent_attrs _list_filtersrrrrrsrc@seZdZdZdS)r))jobsrN)rrrZ _managersrrrrr$src@s~eZdZdZeZedddZeddZdZ de j iZ e ded eejdd d Ze ddeejd dZd S)rz/runners)token) descriptioninfoactivelocked run_untaggedtag_list access_levelmaximum_timeout)requiredoptional)r$r&r)r(r'r*r+)r-scoper)r))r/Nc s@d}i}|dur||d<jj||fi|}fdd|DS)a9List all the runners. Args: scope (str): The scope of runners to show, one of: specific, shared, active, paused, online all (bool): If True, return all the items, without pagination per_page (int): Number of items to retrieve per request page (int): ID of the page to return (starts with page 1) as_list (bool): If set to False and no pagination option is defined, return a generator instead of a list **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabListError: If the server failed to perform the request Returns: list(Runner): a list of runners matching the scope. z /runners/allNr/csg|]}|qSr)r).0itemselfrr az%RunnerManager.all..)gitlabZ http_list)r3r/kwargspathZ query_dataobjrr2rallFs zRunnerManager.allcKs(d}d|i}|jj|fd|i|dS)awValidates authentication credentials for a registered Runner. Args: token (str): The runner's authentication token **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabVerifyError: If the server failed to verify the token z/runners/verifyr# post_dataN)r6Z http_post)r3r#r7r8r;rrrverifycs zRunnerManager.verify)N)rrrrrrr _create_attrsZ _update_attrsr!r ListAttribute_typesrZregister_custom_actiontupleexcZ on_http_errorZGitlabListErrorr:ZGitlabVerifyErrorr<rrrrr(s"      rc@s eZdZdS)rNrrrrrrusrc@s4eZdZdZeZddiZeddZdZ de j iZ dS) rz/groups/%(group_id)s/runnersZgroup_idrrr,r.r)N) rrrrrrr rr=r!rr>r?rrrrrys  rc@s eZdZdS)rNrrrrrrsrc@s4eZdZdZeZddiZeddZdZ de j iZ dS) rz /projects/%(project_id)s/runnersZ project_idrrBrCr.r)N) rrrrrrr rr=r!rr>r?rrrrrs  rN)r6rrrArZ gitlab.baserrrZ gitlab.mixinsrr r r r __all__r rrrrrrrrrrrs    M