mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Include params in Method.output_params
Method overrides the Command get_output_params() method and only returns the object params, not anything defined within the method itself. Return those as well so they are displayed in output. Some care needs to be taken to avoid returning duplicate values. In the case of duplicates the value in obj.params wins.
This commit is contained in:
parent
1400c85188
commit
b46f262a60
@ -784,11 +784,13 @@ class Command(HasParam):
|
||||
cli_name='all',
|
||||
doc=_('retrieve all attributes'),
|
||||
exclude='webui',
|
||||
flags=['no_output'],
|
||||
)
|
||||
yield Flag('raw',
|
||||
cli_name='raw',
|
||||
doc=_('print entries as stored on the server'),
|
||||
exclude='webui',
|
||||
flags=['no_output'],
|
||||
)
|
||||
return
|
||||
|
||||
@ -1131,7 +1133,14 @@ class Method(Attribute, Command):
|
||||
|
||||
def get_output_params(self):
|
||||
for param in self.obj.params():
|
||||
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
|
||||
|
||||
|
||||
class Property(Attribute):
|
||||
|
Loading…
Reference in New Issue
Block a user