]> git.proxmox.com Git - pve-client.git/blobdiff - PVE/APIClient/Commands/list.pm
fix copyright date
[pve-client.git] / PVE / APIClient / Commands / list.pm
index f5388f1214001282a9b477f8ecb4ccec45435aa9..df97d0dc07f341106d20b1916c4aea8b834c5d05 100644 (file)
@@ -25,12 +25,11 @@ __PACKAGE__->register_method ({
     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 => {
@@ -43,9 +42,6 @@ __PACKAGE__->register_method ({
     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});
 
@@ -53,8 +49,12 @@ __PACKAGE__->register_method ({
     }});
 
 
-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;