frontend: copy command arguments to output params on client

In commit f554078291 we stopped copying
command arguments to output params in order to remove redundancies and
reduce API schema in size. Since then, output params were removed from
API schema completely and are reconstructed on the client.

Not including arguments in output params hides failed members from member
commands' CLI output. To fix this, copy arguments to output params again,
but only on the client side.

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

Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
This commit is contained in:
Jan Cholasta 2016-07-18 07:37:31 +02:00
parent b12db92414
commit cdf8b668e7

View File

@ -95,6 +95,10 @@ class ClientMethod(ClientCommand, Method):
def get_output_params(self):
seen = set()
for param in self.params():
if param.name not in self.obj.params:
seen.add(param.name)
yield param
for output_param in super(ClientMethod, self).get_output_params():
seen.add(output_param.name)
yield output_param