5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2024-12-22 21:33:47 +03:00

print_api_result_plain: new helper

Usefull to print result without borders an headers.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
Dietmar Maurer 2018-07-27 15:22:30 +02:00 committed by Thomas Lamprecht
parent 2ec79c0f95
commit 6bc094934b

View File

@ -436,4 +436,16 @@ sub print_api_result {
}
}
sub print_api_result_plain {
my ($data, $result_schema, $props_to_print, $options) = @_;
# avoid borders and header, ignore terminal width
$options = $options ? { %$options } : {}; # copy
$options->{noheader} //= 1;
$options->{noborder} //= 1;
print_api_result($data, $result_schema, $props_to_print, $options, {});
}
1;