name => 'list',
path => 'list',
method => 'GET',
- description => "List containers.",
+ description => "List VMs and Containers.",
parameters => {
additionalProperties => 0,
properties => {
remote => get_standard_option('pveclient-remote-name'),
- 'format' => get_standard_option('pveclient-output-format'),
},
},
returns => {
code => sub {
my ($param) = @_;
- my $format = PVE::APIClient::Tools::extract_param($param, 'format');
- PVE::APIClient::Helpers::set_output_format($format);
-
my $config = PVE::APIClient::Config->load();
my $conn = PVE::APIClient::Config->remote_conn($config, $param->{remote});
}});
-our $cmddef = [ __PACKAGE__, 'list', ['remote'], {}, sub {
- PVE::APIClient::Helpers::print_ordered_result($list_returns_properties, @_);
-}];
+our $cmddef = [ __PACKAGE__, 'list', ['remote'], {},
+ sub {
+ my ($data, $schema, $options) = @_;
+ PVE::APIClient::Helpers::print_ordered_result($list_returns_properties, $data, $schema, $options);
+ },
+ $PVE::APIClient::RESTHandler::standard_output_options,
+ ];
1;