summaryrefslogtreecommitdiffstats
path: root/ipalib/frontend.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-03-09 16:49:02 -0500
committerJason Gerard DeRose <jderose@redhat.com>2010-03-19 04:31:40 -0600
commitb46f262a6080348b936d6439c45b1dbbca277895 (patch)
tree72c7c88bad002ad3c086259963f3b8e0b2ef5116 /ipalib/frontend.py
parent1400c85188b63d44c44fddd1e9bf68b0b7b868ba (diff)
downloadfreeipa-b46f262a6080348b936d6439c45b1dbbca277895.tar.gz
freeipa-b46f262a6080348b936d6439c45b1dbbca277895.tar.xz
freeipa-b46f262a6080348b936d6439c45b1dbbca277895.zip
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.
Diffstat (limited to 'ipalib/frontend.py')
-rw-r--r--ipalib/frontend.py9
1 files changed, 9 insertions, 0 deletions
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):