summaryrefslogtreecommitdiff
path: root/saharaclient/api
diff options
context:
space:
mode:
authorAndrey Pavlov <apavlov@mirantis.com>2015-10-15 15:03:57 +0300
committerAndrey Pavlov <apavlov@mirantis.com>2015-10-20 05:51:54 +0000
commitdd57defe92b1945f9658e864d85b260da89f089b (patch)
treed4d5581409a03b5660bbeda99e86676bb0904edc /saharaclient/api
parent29fe1b98e7fe676b7f6fa7d17f6931b36a58b6fb (diff)
downloadpython-saharaclient-dd57defe92b1945f9658e864d85b260da89f089b.tar.gz
Making parameters of job create optional
mains, libs and description parameters of job create method should not be required. This change doesn't break backward compatibility. Change-Id: I9c90f86ea70217fe5e404e097cd6f9ec6a32fe58 Closes-bug: #1506448
Diffstat (limited to 'saharaclient/api')
-rw-r--r--saharaclient/api/jobs.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/saharaclient/api/jobs.py b/saharaclient/api/jobs.py
index 0e5bbec..b352772 100644
--- a/saharaclient/api/jobs.py
+++ b/saharaclient/api/jobs.py
@@ -23,18 +23,16 @@ class Job(base.Resource):
class JobsManager(base.ResourceManager):
resource_class = Job
- def create(self, name, type, mains, libs, description, interface=None,
- is_public=None, is_protected=None):
+ def create(self, name, type, mains=None, libs=None, description=None,
+ interface=None, is_public=None, is_protected=None):
data = {
'name': name,
- 'type': type,
- 'description': description,
- 'mains': mains,
- 'libs': libs,
+ 'type': type
}
- self._copy_if_defined(data, interface=interface, is_public=is_public,
- is_protected=is_protected)
+ self._copy_if_defined(data, description=description, mains=mains,
+ libs=libs, interface=interface,
+ is_public=is_public, is_protected=is_protected)
return self._create('/jobs', data, 'job')