summaryrefslogtreecommitdiff
path: root/gitlab/objects.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab/objects.py')
-rw-r--r--gitlab/objects.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/gitlab/objects.py b/gitlab/objects.py
index 3c38e8e..f067657 100644
--- a/gitlab/objects.py
+++ b/gitlab/objects.py
@@ -802,11 +802,28 @@ class Key(GitlabObject):
canUpdate = False
canDelete = False
+ def __init__(self, *args, **kwargs):
+ warnings.warn("`Key` is deprecated, use `DeployKey` instead",
+ DeprecationWarning)
+ super(Key, self).__init__(*args, **kwargs)
+
class KeyManager(BaseManager):
obj_cls = Key
+class DeployKey(GitlabObject):
+ _url = '/deploy_keys'
+ canGet = 'from_list'
+ canCreate = False
+ canUpdate = False
+ canDelete = False
+
+
+class DeployKeyManager(BaseManager):
+ obj_cls = DeployKey
+
+
class NotificationSettings(GitlabObject):
_url = '/notification_settings'
_id_in_update_url = False