use PVE::APIClient::JSONSchema qw(get_standard_option);
+use PVE::APIClient::Config;
+use PVE::APIClient::CLIHandler;
+
use base qw(PVE::APIClient::CLIHandler);
__PACKAGE__->register_method ({
additionalProperties => 0,
properties => {
remote => get_standard_option('pveclient-remote-name'),
- format => {
- type => 'string',
- description => 'Output format',
- enum => [ 'table', 'json' ],
- optional => 1,
- default => 'table',
- }
+ format => get_standard_option('pveclient-output-format'),
},
},
returns => { type => 'null'},
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) {
our $cmddef = [ __PACKAGE__, 'list', ['remote']];
-1;
\ No newline at end of file
+1;