summaryrefslogtreecommitdiff
path: root/gitlab/__init__.py
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain.pocentek@objectif-libre.com>2015-07-11 08:56:17 +0200
committerGauvain Pocentek <gauvain.pocentek@objectif-libre.com>2015-07-11 08:57:44 +0200
commit802c144cfd199684506b3404f03c3657c75e307d (patch)
tree1ab2f010b98c368288867ecc9a7bd1d5a5fccf47 /gitlab/__init__.py
parente57b7794d1e1ae6795f5b914132a2891dc0d9509 (diff)
downloadgitlab-802c144cfd199684506b3404f03c3657c75e307d.tar.gz
Fix the update/delete CLI subcommands
Also update the testing tool to test these features. Closes #62
Diffstat (limited to 'gitlab/__init__.py')
-rw-r--r--gitlab/__init__.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/gitlab/__init__.py b/gitlab/__init__.py
index 93e8b82..52fc7db 100644
--- a/gitlab/__init__.py
+++ b/gitlab/__init__.py
@@ -643,6 +643,11 @@ class GitlabObject(object):
requiredCreateAttrs = []
#: Attributes that are optional when creating a new object
optionalCreateAttrs = []
+ #: Attributes that are required when updating an object
+ requiredUpdateAttrs = None
+ #: Attributes that are optional when updating an object
+ optionalUpdateAttrs = None
+
idAttr = 'id'
shortPrintAttr = None
@@ -1086,6 +1091,7 @@ class ProjectLabel(GitlabObject):
idAttr = 'name'
requiredDeleteAttrs = ['name']
requiredCreateAttrs = ['name', 'color']
+ requiredUpdateAttrs = []
# FIXME: new_name is only valid with update
optionalCreateAttrs = ['new_name']
@@ -1157,6 +1163,7 @@ class Project(GitlabObject):
_url = '/projects'
_constructorTypes = {'owner': 'User', 'namespace': 'Group'}
requiredCreateAttrs = ['name']
+ requiredUpdateAttrs = []
optionalCreateAttrs = ['default_branch', 'issues_enabled', 'wall_enabled',
'merge_requests_enabled', 'wiki_enabled',
'snippets_enabled', 'public', 'visibility_level',