diff options
author | Jan Cholasta <jcholast@redhat.com> | 2016-06-08 16:00:49 +0200 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2016-06-20 16:39:12 +0200 |
commit | f554078291d682d59956998af97f7d3066fbe7e7 (patch) | |
tree | 536cda31a019bce7886dc4a9f64d23aa24e55f44 /ipalib | |
parent | db13494045198842a049d40a3481d9081c7ce175 (diff) | |
download | freeipa-f554078291d682d59956998af97f7d3066fbe7e7.tar.gz freeipa-f554078291d682d59956998af97f7d3066fbe7e7.tar.xz freeipa-f554078291d682d59956998af97f7d3066fbe7e7.zip |
frontend: don't copy command arguments to output params
Use only object params and params defined in has_output_params as output
params. This removes unnecessary duplication of params defined both in
object plugins and as command arguments.
This requires all command output params to be properly defined in either
the object plugins or the command's has_output_params. Fix the plugins
where this wasn't true.
https://fedorahosted.org/freeipa/ticket/4739
Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipalib')
-rw-r--r-- | ipalib/frontend.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/ipalib/frontend.py b/ipalib/frontend.py index 49ff8a174..672f5576b 100644 --- a/ipalib/frontend.py +++ b/ipalib/frontend.py @@ -991,12 +991,6 @@ class Command(HasParam): def get_output_params(self): for param in self._get_param_iterable('output_params', verb='has'): yield param - if self.params is None: - return - for param in self.params(): - if 'no_output' in param.flags: - continue - yield param def get_summary_default(self, output): if self.msg_summary: @@ -1421,12 +1415,7 @@ class Method(Attribute, Command): if 'no_output' in param.flags: continue yield param - for param in self.params(): - if param.name not in list(self.obj.params): - if 'no_output' in param.flags: - continue - yield param - for param in self._get_param_iterable('output_params', verb='has'): + for param in super(Method, self).get_output_params(): yield param |