summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/gl_objects/runners.rst4
-rw-r--r--gitlab/v4/objects.py7
2 files changed, 9 insertions, 2 deletions
diff --git a/docs/gl_objects/runners.rst b/docs/gl_objects/runners.rst
index 1e6f81b..726341b 100644
--- a/docs/gl_objects/runners.rst
+++ b/docs/gl_objects/runners.rst
@@ -54,6 +54,10 @@ Get a runner's detail::
runner = gl.runners.get(runner_id)
+Register a new runner::
+
+ runner = gl.runners.create({'token': secret_token})
+
Update a runner::
runner = gl.runners.get(runner_id)
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index 3ac83aa..bbd6c24 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -3252,13 +3252,16 @@ class Runner(SaveMixin, ObjectDeleteMixin, RESTObject):
_managers = (('jobs', 'RunnerJobManager'),)
-class RunnerManager(RetrieveMixin, UpdateMixin, DeleteMixin, RESTManager):
+class RunnerManager(CRUDMixin, RESTManager):
_path = '/runners'
_obj_cls = Runner
+ _list_filters = ('scope', )
+ _create_attrs = (('token',), ('description', 'info', 'active', 'locked',
+ 'run_untagged', 'tag_list',
+ 'maximum_timeout'))
_update_attrs = (tuple(), ('description', 'active', 'tag_list',
'run_untagged', 'locked', 'access_level',
'maximum_timeout'))
- _list_filters = ('scope', )
@cli.register_custom_action('RunnerManager', tuple(), ('scope', ))
@exc.on_http_error(exc.GitlabListError)