summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2017-09-02 15:44:57 +0200
committerGauvain Pocentek <gauvain@pocentek.net>2017-09-02 15:44:57 +0200
commitfcccfbda6342659ae4e040901bfd0ddaeb4541d5 (patch)
tree6a694227a7deda7d8533d1009d5525b4d717b345 /gitlab/v4/objects.py
parent0e0d4aee3e73e2caf86c50bc9152764528f7725a (diff)
parenteb191dfaa42eb39d9d1b5acc21fc0c4c0fb99427 (diff)
downloadgitlab-fcccfbda6342659ae4e040901bfd0ddaeb4541d5.tar.gz
Merge branch 'group-variables'
Diffstat (limited to 'gitlab/v4/objects.py')
-rw-r--r--gitlab/v4/objects.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index 3b1eb91..92c4543 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -2185,6 +2185,18 @@ class GroupProjectManager(GetFromListMixin, RESTManager):
'ci_enabled_first')
+class GroupVariable(SaveMixin, ObjectDeleteMixin, RESTObject):
+ _id_attr = 'key'
+
+
+class GroupVariableManager(CRUDMixin, RESTManager):
+ _path = '/groups/%(group_id)s/variables'
+ _obj_cls = GroupVariable
+ _from_parent_attrs = {'group_id': 'id'}
+ _create_attrs = (('key', 'value'), ('protected',))
+ _update_attrs = (('key', 'value'), ('protected',))
+
+
class Group(SaveMixin, ObjectDeleteMixin, RESTObject):
_short_print_attr = 'name'
_managers = (
@@ -2193,6 +2205,7 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject):
('notificationsettings', 'GroupNotificationSettingsManager'),
('projects', 'GroupProjectManager'),
('issues', 'GroupIssueManager'),
+ ('variables', 'GroupVariableManager'),
)
@cli.register_custom_action('Group', ('to_project_id', ))