my $conn = PVE::APIClient::Config->remote_conn($config, $param->{remote});
my $resources = $conn->get('api2/json/cluster/resources', { type => 'vm' });
- if (!defined($param->{format}) or $param->{format} eq 'table') {
+ if (!defined($param->{format}) or $param->{format} eq 'text') {
my $headers = ['Node', 'VMID', 'Type', 'Name', 'Status'];
my $data = [];
for my $el (@$resources) {
PVE::APIClient::JSONSchema::register_standard_option('pveclient-output-format', {
type => 'string',
description => 'Output format.',
- enum => [ 'table', 'json' ],
+ enum => [ 'text', 'json' ],
optional => 1,
- default => 'table',
+ default => 'text',
});
PVE::APIClient::JSONSchema::register_standard_option('pveclient-remote-name', {
}
};
-my $default_output_format = 'table';
+my $default_output_format = 'text';
my $client_output_format = $default_output_format;
sub set_output_format {
if ($format eq 'json') {
print to_json($data, {utf8 => 1, allow_nonref => 1, canonical => 1, pretty => 1 });
- } elsif ($format eq 'table') {
+ } elsif ($format eq 'text') {
my $type = $result_schema->{type};
if ($type eq 'object') {
die "implement me";