pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

Blame SOURCES/0018-frontend-copy-command-arguments-to-output-params-on-.patch

403b09
From 1297d5f1ba731e81b03a2fca997487813a2e962a Mon Sep 17 00:00:00 2001
403b09
From: Jan Cholasta <jcholast@redhat.com>
403b09
Date: Mon, 18 Jul 2016 07:37:31 +0200
403b09
Subject: [PATCH] frontend: copy command arguments to output params on client
403b09
403b09
In commit f554078291d682d59956998af97f7d3066fbe7e7 we stopped copying
403b09
command arguments to output params in order to remove redundancies and
403b09
reduce API schema in size. Since then, output params were removed from
403b09
API schema completely and are reconstructed on the client.
403b09
403b09
Not including arguments in output params hides failed members from member
403b09
commands' CLI output. To fix this, copy arguments to output params again,
403b09
but only on the client side.
403b09
403b09
https://fedorahosted.org/freeipa/ticket/6026
403b09
403b09
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
403b09
---
403b09
 ipaclient/frontend.py | 4 ++++
403b09
 1 file changed, 4 insertions(+)
403b09
403b09
diff --git a/ipaclient/frontend.py b/ipaclient/frontend.py
403b09
index e8eacc068f4bec5ccdb21228b32a88aea24424df..1525c88b3dfeadccd8115cb4b6ba149caef22103 100644
403b09
--- a/ipaclient/frontend.py
403b09
+++ b/ipaclient/frontend.py
403b09
@@ -95,6 +95,10 @@ class ClientMethod(ClientCommand, Method):
403b09
 
403b09
     def get_output_params(self):
403b09
         seen = set()
403b09
+        for param in self.params():
403b09
+            if param.name not in self.obj.params:
403b09
+                seen.add(param.name)
403b09
+                yield param
403b09
         for output_param in super(ClientMethod, self).get_output_params():
403b09
             seen.add(output_param.name)
403b09
             yield output_param
403b09
-- 
403b09
2.7.4
403b09