Skip to content
Snippets Groups Projects
Commit 19708787 authored by Iustin Pop's avatar Iustin Pop
Browse files

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
parent 4cfb9426
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment