]> git.proxmox.com Git - pve-common.git/commit - src/PVE/RESTHandler.pm
PVE::CLIHandler - allow to define additional parameters for output formatter
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 25 Jul 2018 07:13:34 +0000 (09:13 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 26 Jul 2018 09:08:52 +0000 (11:08 +0200)
commit9da2722861bfcc1acdc2830e76a39b9ee14b041c
treed87635935d06809dfdc60b9e0eb0c3c39996d5ce
parent4cbcd1386f225f42896fe790337d152718498693
PVE::CLIHandler - allow to define additional parameters for output formatter

Best shown with a example:

my $test_formatter = sub {
    my ($res, $result_schema, $fmt_param) = @_;
    PVE::CLIFormatter::print_api_result($res, $result_schema, undef, $fmt_param);
};

$cmddef = [ __PACKAGE__, 'test', [], undef, $test_formatter, $PVE::RESTHandler::standard_output_options],
src/PVE/CLIHandler.pm
src/PVE/RESTHandler.pm