diff options
Diffstat (limited to 'gitlab/v4/objects.py')
-rw-r--r-- | gitlab/v4/objects.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index a5ddd84..3ac83aa 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -3237,14 +3237,27 @@ class ProjectManager(CRUDMixin, RESTManager): files=files, **kwargs) -class Runner(SaveMixin, ObjectDeleteMixin, RESTObject): +class RunnerJob(RESTObject): pass +class RunnerJobManager(ListMixin, RESTManager): + _path = '/runners/%(runner_id)s/jobs' + _obj_cls = RunnerJob + _from_parent_attrs = {'runner_id': 'id'} + _list_filters = ('status',) + + +class Runner(SaveMixin, ObjectDeleteMixin, RESTObject): + _managers = (('jobs', 'RunnerJobManager'),) + + class RunnerManager(RetrieveMixin, UpdateMixin, DeleteMixin, RESTManager): _path = '/runners' _obj_cls = Runner - _update_attrs = (tuple(), ('description', 'active', 'tag_list')) + _update_attrs = (tuple(), ('description', 'active', 'tag_list', + 'run_untagged', 'locked', 'access_level', + 'maximum_timeout')) _list_filters = ('scope', ) @cli.register_custom_action('RunnerManager', tuple(), ('scope', )) |