X-Git-Url: https://git.proxmox.com/?p=pve-client.git;a=blobdiff_plain;f=PVE%2FAPIClient%2FCommands%2Fconfig.pm;h=b4316d80550ecce889504b0b2ee5bf2a26f11c38;hp=0b9b9aa82152bfee5399aa8f290e7ffcfc8a14da;hb=59d3653b9157801cb1fcd2c80cc03df2db9437f8;hpb=e42d9cfe59f43b5419184cfa7adf250b9e0a6492 diff --git a/PVE/APIClient/Commands/config.pm b/PVE/APIClient/Commands/config.pm index 0b9b9aa..b4316d8 100644 --- a/PVE/APIClient/Commands/config.pm +++ b/PVE/APIClient/Commands/config.pm @@ -9,6 +9,7 @@ use PVE::APIClient::JSONSchema qw(get_standard_option); use PVE::APIClient::Tools qw(extract_param); use PVE::APIClient::Config; +use PVE::APIClient::CLIFormatter; use PVE::APIClient::CLIHandler; use base qw(PVE::APIClient::CLIHandler); @@ -23,6 +24,7 @@ __PACKAGE__->register_method ({ description => "Dump default configuration.", parameters => { additionalProperties => 0, + properties => {}, }, returns => { type => 'object', @@ -54,6 +56,9 @@ __PACKAGE__->register_method ({ my $code = sub { my $config = PVE::APIClient::Config->load(); + + PVE::APIClient::Tools::assert_if_modified($config->{digest}, $digest); + my $defaults = PVE::APIClient::Config->get_defaults($config); my $plugin = PVE::APIClient::Config->lookup('defaults'); @@ -87,7 +92,13 @@ __PACKAGE__->register_method ({ our $cmddef = { set => [ __PACKAGE__, 'set',], - list => [__PACKAGE__, 'list', undef, undef, sub { PVE::APIClient::Helpers::print_result(@_);}], + list => [__PACKAGE__, 'list', undef, undef, + sub { + my ($data, $schema, $options) = @_; + + PVE::APIClient::CLIFormatter::print_api_result($data, $schema, undef, $options); + } + ], }; 1;