[pve-devel] [pve-common] pvenode: fix print_api_result usage, avoid print_api_list
Dietmar Maurer
dietmar at proxmox.com
Wed Jul 11 07:39:53 CEST 2018
sorry, this patch is for pve-manager!
> On July 11, 2018 at 7:38 AM Dietmar Maurer <dietmar at proxmox.com> wrote:
>
>
> Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
> ---
> PVE/CLI/pvenode.pm | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/PVE/CLI/pvenode.pm b/PVE/CLI/pvenode.pm
> index 480e26c0..9092a6c9 100644
> --- a/PVE/CLI/pvenode.pm
> +++ b/PVE/CLI/pvenode.pm
> @@ -183,17 +183,17 @@ our $cmddef = {
>
> task => {
> list => [ 'PVE::API2::Tasks', 'node_tasks', [], { node => $nodename }, sub {
> - my ($data, $resultprops) = @_;
> + my ($data, $schema, $options) = @_;
> foreach my $task (@$data) {
> if ($task->{status} ne 'OK') {
> $task->{status} = 'ERROR';
> }
> }
> - PVE::CLIFormatter::print_api_list($data, $resultprops, ['upid', 'type',
> 'id', 'user', 'starttime', 'endtime', 'status' ], { noborder => 1 });
> + PVE::CLIFormatter::print_api_result($data, $schema, ['upid', 'type',
> 'id', 'user', 'starttime', 'endtime', 'status' ], $options);
> }],
> status => [ 'PVE::API2::Tasks', 'read_task_status', [ 'upid' ], { node =>
> $nodename }, sub {
> - my ($data, $resultprops) = @_;
> - PVE::CLIFormatter::print_api_result('text', $data, $resultprops);
> + my ($data, $schema, $options) = @_;
> + PVE::CLIFormatter::print_api_result($data, $schema, undef, $options);
> }],
> # set limit to 1000000, so we see the whole log, not only the first 50 lines
> by default
> log => [ 'PVE::API2::Tasks', 'read_task_log', [ 'upid' ], { node =>
> $nodename, limit => 1000000 }, sub {
> --
> 2.11.0
>
>
More information about the pve-devel
mailing list