diff options
Diffstat (limited to 'gitlab')
-rw-r--r-- | gitlab/__init__.py | 1 | ||||
-rw-r--r-- | gitlab/objects.py | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/gitlab/__init__.py b/gitlab/__init__.py index 119dab0..cce282d 100644 --- a/gitlab/__init__.py +++ b/gitlab/__init__.py @@ -91,6 +91,7 @@ class Gitlab(object): self.broadcastmessages = BroadcastMessageManager(self) self.keys = KeyManager(self) + self.deploykeys = DeployKeyManager(self) self.gitlabciymls = GitlabciymlManager(self) self.gitignores = GitignoreManager(self) self.groups = GroupManager(self) 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 |