Skip to content
Snippets Groups Projects
  • Iustin Pop's avatar
    Heavy redo of gnt-instance info output · 19708787
    Iustin Pop authored
    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
    19708787