diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2017-01-21 14:42:12 +0100 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2017-01-21 14:42:12 +0100 |
commit | 04435e1b13166fb45216c494f3af4d9bdb76bcaf (patch) | |
tree | 894bc1b8da43ea03cac315a5f144e42e4b8ac9a7 /gitlab/objects.py | |
parent | de0536b1cfff43c494c64930a37333529e589a94 (diff) | |
download | gitlab-04435e1b13166fb45216c494f3af4d9bdb76bcaf.tar.gz |
Add support for project runners
This API allows to enable/disable specific runners for a project, and to
list the project associated runners.
Fix #205
Diffstat (limited to 'gitlab/objects.py')
-rw-r--r-- | gitlab/objects.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gitlab/objects.py b/gitlab/objects.py index b2c0c04..3f09aad 100644 --- a/gitlab/objects.py +++ b/gitlab/objects.py @@ -2142,6 +2142,16 @@ class ProjectDeploymentManager(BaseManager): obj_cls = ProjectDeployment +class ProjectRunner(GitlabObject): + _url = '/projects/%(project_id)s/runners' + canUpdate = False + requiredCreateAttrs = ['runner_id'] + + +class ProjectRunnerManager(BaseManager): + obj_cls = ProjectRunner + + class Project(GitlabObject): _url = '/projects' _constructorTypes = {'owner': 'User', 'namespace': 'Group'} @@ -2189,6 +2199,7 @@ class Project(GitlabObject): ('notificationsettings', ProjectNotificationSettingsManager, [('project_id', 'id')]), ('pipelines', ProjectPipelineManager, [('project_id', 'id')]), + ('runners', ProjectRunnerManager, [('project_id', 'id')]), ('services', ProjectServiceManager, [('project_id', 'id')]), ('snippets', ProjectSnippetManager, [('project_id', 'id')]), ('tags', ProjectTagManager, [('project_id', 'id')]), |