mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user