]> git.proxmox.com Git - pve-common.git/commit
add print_text_table, print_entry to CLIHandler
authorStoiko Ivanov <s.ivanov@proxmox.com>
Mon, 18 Jun 2018 08:18:01 +0000 (10:18 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 18 Jun 2018 09:24:03 +0000 (11:24 +0200)
commit8042c2cc6264a56683c96862cb831d9dde0d24c6
tree4dc1f3446aa612b88bcb74d2d22a6b88c4ee0e23
parentf8d4eff923317a45d9225c5a56f210b6e375138b
add print_text_table, print_entry to CLIHandler

These two function could serve as a generic output sub for various CLI
utilities
 * print_text_table prints an array of objects in a tabular fashion,
   the formating is passed as an array containg hashes with titles, maximal
   lengths and default values. This way we can stay extensible, by adding other
   keys to the formatting options
 * print_entry prints out a single entry, handling array-refs as properties

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/PVE/CLIHandler.pm