summaryrefslogtreecommitdiffstats
path: root/ipaclient/frontend.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2016-07-18 07:37:31 +0200
committerJan Cholasta <jcholast@redhat.com>2016-07-20 13:12:37 +0200
commitcdf8b668e7fa1ea99e2ffe2eac0555744130fb76 (patch)
tree23d6bf6bc6d0455d6d06bbaea49dd8ee563490e7 /ipaclient/frontend.py
parentb12db924143cd6828c596c0b8a261325f3f589f3 (diff)
downloadfreeipa-cdf8b668e7fa1ea99e2ffe2eac0555744130fb76.tar.gz
freeipa-cdf8b668e7fa1ea99e2ffe2eac0555744130fb76.tar.xz
freeipa-cdf8b668e7fa1ea99e2ffe2eac0555744130fb76.zip
frontend: copy command arguments to output params on client
In commit f554078291d682d59956998af97f7d3066fbe7e7 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>
Diffstat (limited to 'ipaclient/frontend.py')
-rw-r--r--ipaclient/frontend.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ipaclient/frontend.py b/ipaclient/frontend.py
index e8eacc068..1525c88b3 100644
--- a/ipaclient/frontend.py
+++ b/ipaclient/frontend.py
@@ -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