frontend: do not forward argument defaults to server

When forwarding a command call to a server, use only arguments which were
explicitly specified by the caller.

This increases compatibility between new clients and old servers.

https://fedorahosted.org/freeipa/ticket/4739

Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
Jan Cholasta
2016-04-06 15:26:48 +02:00
parent 213237c7fe
commit ac2e9e84cf
2 changed files with 5 additions and 2 deletions

View File

@@ -1243,6 +1243,8 @@ class cli(backend.Executioner):
if param.autofill:
kw[param.name] = cmd.get_default_of(param.name, **kw)
if param.name in kw and kw[param.name] is not None:
if param.autofill:
del kw[param.name]
continue
if param.password:
kw[param.name] = self.Backend.textui.prompt_password(