summaryrefslogtreecommitdiff
path: root/gitlab
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain@pocentek.net>2017-12-31 17:52:57 +0100
committerGauvain Pocentek <gauvain@pocentek.net>2017-12-31 17:52:57 +0100
commitc281d95c2f978d8d2eb1d77352babf5217d32062 (patch)
treeb25838f9379fb73abc01996c9221f99c4b262e32 /gitlab
parent6923f117bc20fffcb0256e7cda35534ee48b058f (diff)
downloadgitlab-c281d95c2f978d8d2eb1d77352babf5217d32062.tar.gz
Add support for pagesdomains
Closes #362
Diffstat (limited to 'gitlab')
-rw-r--r--gitlab/__init__.py1
-rw-r--r--gitlab/v4/objects.py22
2 files changed, 23 insertions, 0 deletions
diff --git a/gitlab/__init__.py b/gitlab/__init__.py
index e7b09a4..950db86 100644
--- a/gitlab/__init__.py
+++ b/gitlab/__init__.py
@@ -125,6 +125,7 @@ class Gitlab(object):
self.teams = objects.TeamManager(self)
else:
self.dockerfiles = objects.DockerfileManager(self)
+ self.pagesdomains = objects.PagesDomainManager(self)
self.user_activities = objects.UserActivitiesManager(self)
if self._api_version == '3':
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index 4bf6776..397bfb5 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -723,6 +723,15 @@ class NamespaceManager(GetFromListMixin, RESTManager):
_list_filters = ('search', )
+class PagesDomain(RESTObject):
+ _id_attr = 'domain'
+
+
+class PagesDomainManager(ListMixin, RESTManager):
+ _path = '/pages/domains'
+ _obj_cls = PagesDomain
+
+
class ProjectBoardList(SaveMixin, ObjectDeleteMixin, RESTObject):
pass
@@ -1249,6 +1258,18 @@ class ProjectNotificationSettingsManager(NotificationSettingsManager):
_from_parent_attrs = {'project_id': 'id'}
+class ProjectPagesDomain(SaveMixin, ObjectDeleteMixin, RESTObject):
+ _id_attr = 'domain'
+
+
+class ProjectPagesDomainManager(CRUDMixin, RESTManager):
+ _path = '/projects/%(project_id)s/pages/domains'
+ _obj_cls = ProjectPagesDomain
+ _from_parent_attrs = {'project_id': 'id'}
+ _create_attrs = (('domain', ), ('certificate', 'key'))
+ _update_attrs = (tuple(), ('certificate', 'key'))
+
+
class ProjectTag(ObjectDeleteMixin, RESTObject):
_id_attr = 'name'
_short_print_attr = 'name'
@@ -2161,6 +2182,7 @@ class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
('milestones', 'ProjectMilestoneManager'),
('notes', 'ProjectNoteManager'),
('notificationsettings', 'ProjectNotificationSettingsManager'),
+ ('pagesdomains', 'ProjectPagesDomainManager'),
('pipelines', 'ProjectPipelineManager'),
('protectedbranches', 'ProjectProtectedBranchManager'),
('runners', 'ProjectRunnerManager'),