summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects.py
diff options
context:
space:
mode:
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', ))