summaryrefslogtreecommitdiff
path: root/gitlab
diff options
context:
space:
mode:
authorAsher256@users.noreply.github.com <Asher256>2016-10-30 22:14:38 -0400
committerAsher256@users.noreply.github.com <Asher256>2016-10-30 22:14:38 -0400
commitfc5c52ce6595784a13e9c114a2ef9b7c9aeaf39a (patch)
treeea32864ab122ee84ae53d7724060b174e9a74f2c /gitlab
parent67aa79550ab9f39071652ced840f7963ec7a3992 (diff)
downloadgitlab-fc5c52ce6595784a13e9c114a2ef9b7c9aeaf39a.tar.gz
enable/disable deploy key methos moved to the class ProjectKey()
Diffstat (limited to 'gitlab')
-rw-r--r--gitlab/objects.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/gitlab/objects.py b/gitlab/objects.py
index 5730e64..f307156 100644
--- a/gitlab/objects.py
+++ b/gitlab/objects.py
@@ -1249,23 +1249,23 @@ class ProjectKey(GitlabObject):
requiredUrlAttrs = ['project_id']
requiredCreateAttrs = ['title', 'key']
-
-class ProjectKeyManager(BaseManager):
- obj_cls = ProjectKey
-
def enable_deploy_key(self, project_id, key_id):
- """Enable a deploy key in a project."""
+ """Enable a deploy key for a project."""
url = '/projects/%s/deploy_keys/%s/enable' % (project_id, key_id)
r = self.gitlab._raw_post(url)
raise_error_from_response(r, GitlabBuildRetryError, 201)
def disable_deploy_key(self, project_id, key_id):
- """Disable a deploy key in a project."""
+ """Disable a deploy key for a project."""
url = '/projects/%s/deploy_keys/%s/disable' % (project_id, key_id)
r = self.gitlab._raw_delete(url)
raise_error_from_response(r, GitlabBuildRetryError, 201)
+class ProjectKeyManager(BaseManager):
+ obj_cls = ProjectKey
+
+
class ProjectEvent(GitlabObject):
_url = '/projects/%(project_id)s/events'
canGet = 'from_list'