summaryrefslogtreecommitdiffstats
path: root/ipalib/frontend.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-11-12 01:47:37 -0700
committerJason Gerard DeRose <jderose@redhat.com>2008-11-12 01:47:37 -0700
commit09161e399a61e2a548e9efb3c3abb2c7b47d5520 (patch)
treea168eb43e22563cb328631605ec8ee6f4a814165 /ipalib/frontend.py
parent014af24731ff39520a9635694ed99dc9d09669c9 (diff)
downloadfreeipa-09161e399a61e2a548e9efb3c3abb2c7b47d5520.tar.gz
freeipa-09161e399a61e2a548e9efb3c3abb2c7b47d5520.tar.xz
freeipa-09161e399a61e2a548e9efb3c3abb2c7b47d5520.zip
Command.get_default() will now fill-in None for all missing non-required params
Diffstat (limited to 'ipalib/frontend.py')
-rw-r--r--ipalib/frontend.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/ipalib/frontend.py b/ipalib/frontend.py
index 62a503cc5..ce4168bc9 100644
--- a/ipalib/frontend.py
+++ b/ipalib/frontend.py
@@ -639,8 +639,11 @@ class Command(plugable.Plugin):
Generator method used by `Command.get_default`.
"""
for param in self.params():
- if param.required and kw.get(param.name, None) is None:
- yield (param.name, param.get_default(**kw))
+ if kw.get(param.name, None) is None:
+ if param.required:
+ yield (param.name, param.get_default(**kw))
+ else:
+ yield (param.name, None)
def validate(self, **kw):
"""
@@ -694,7 +697,7 @@ class Command(plugable.Plugin):
"""
Forward call over XML-RPC to this same command on server.
"""
- return self.api.Backend.xmlrpc.forward_call(self.name, *args, **kw)
+ return self.Backend.xmlrpc.forward_call(self.name, *args, **kw)
def finalize(self):
"""