From b46f262a6080348b936d6439c45b1dbbca277895 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Tue, 9 Mar 2010 16:49:02 -0500 Subject: 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. --- ipalib/frontend.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ipalib/frontend.py') diff --git a/ipalib/frontend.py b/ipalib/frontend.py index ba2e44edc..3727833a2 100644 --- a/ipalib/frontend.py +++ b/ipalib/frontend.py @@ -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): -- cgit