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:
parent
2ec79c0f95
commit
6bc094934b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user