« Previous | Next » 

Revision 19708787


Added by Iustin Pop about 15 years ago

Heavy redo of gnt-instance info output

In 2.0, we have more parameters in drbd's logical_id, and passing the
results over json makes them unicode which looks worse with the default
formatting. As such, a redo of the output is needed.

This patch:
- adds a separate function to format the logical_id of devices
- moves the actual indentation format out of _FormatBlockDevInfo,
which now just generates a list of items
- adds a function _FormatList that recursively formats the list
- formats specially key,value tuples

The result is that the output is nicer, and the code in
_FormatBlockDevInfo somewhat cleaner (as it doesn't deal with spacing
and such issues).

Reviewed-by: ultrotter


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences