diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2017-03-17 17:39:20 +0100 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2017-03-17 17:39:20 +0100 |
commit | a3f2ab138502cf3217d1b97ae7f3cd3a4f8b324f (patch) | |
tree | 4c367da925afe228d83d61601fdf0af9b3a17b13 /gitlab/objects.py | |
parent | ea0759d71c6678b8ce65791535a9be1675d9cfab (diff) | |
download | gitlab-a3f2ab138502cf3217d1b97ae7f3cd3a4f8b324f.tar.gz |
Add DeployKey{,Manager} classes
They are the same as Key and KeyManager but the name makes more sense.
Fixes #212
Diffstat (limited to 'gitlab/objects.py')
-rw-r--r-- | gitlab/objects.py | 17 |
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 |