In order to draw the new asciiart border ... Signed-off-by: Dietmar Maurer <diet...@proxmox.com> --- src/PVE/CLIFormatter.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/PVE/CLIFormatter.pm b/src/PVE/CLIFormatter.pm index b55861a..80504b2 100644 --- a/src/PVE/CLIFormatter.pm +++ b/src/PVE/CLIFormatter.pm @@ -143,9 +143,12 @@ sub print_api_result { my $type = $result_schema->{type}; if ($type eq 'object') { $props_to_print = [ sort keys %$data ] if !defined($props_to_print); + my $kvstore = []; foreach my $key (@$props_to_print) { - print $key . ": " . data_to_text($data->{$key}) . "\n"; + push @$kvstore, { key => $key, value => data_to_text($data->{$key}) }; } + my $schema = { type => 'array', items => { type => 'object' }}; + print_api_list($kvstore, $schema, ['key', 'value'], 0, $format eq 'text'); } elsif ($type eq 'array') { return if !scalar(@$data); my $item_type = $result_schema->{items}->{type}; -- 2.11.0 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel