Improve CLI output for complex commands

Complex commands may have many options or non-standard output. This
patch adds 2 improvements to handle these commands better:
  1) Add "option_group" parameter attribute
     Make command help more readable by specifying an option group
     for the parameter. All parameters in the same option group are
     then placed to one named option group
  2) Allow nested entries in the output
     Current CLI output module cannot handle a list of nested entries
     (dictionaries) contained in an entry attribute. Make sure they
     are printed properly (with indentation)

https://fedorahosted.org/freeipa/ticket/2082
This commit is contained in:
Martin Kosek
2012-01-12 09:43:13 +01:00
parent 1f36ab1b78
commit 2188dae0c9
2 changed files with 24 additions and 4 deletions
+1
View File
@@ -384,6 +384,7 @@ class Param(ReadOnly):
('csv', bool, False),
('csv_separator', str, ','),
('csv_skipspace', bool, True),
('option_group', unicode, None),
# The 'default' kwarg gets appended in Param.__init__():
# ('default', self.type, None),