summaryrefslogtreecommitdiffstats
path: root/ipalib/frontend.py
diff options
context:
space:
mode:
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 65b053e6..da4fd00b 100644
--- a/ipalib/frontend.py
+++ b/ipalib/frontend.py
@@ -486,6 +486,7 @@ class Command(plugable.Plugin):
'params',
'args_to_kw',
'kw_to_args',
+ 'output_for_cli',
))
takes_options = tuple()
takes_args = tuple()
@@ -741,6 +742,14 @@ class Command(plugable.Plugin):
multivalue = True
yield arg
+ def output_for_cli(self, ret):
+ """
+ Output result of this command to command line interface.
+ """
+ assert type(ret) is dict, 'base output_for_cli() only works with dict'
+ for key in sorted(ret):
+ print '%s = %r' % (key, ret[key])
+
class Object(plugable.Plugin):
__public__ = frozenset((