Add API and pvesm call for prune_backups
For the pvesm call use a wrapper and a --dry-run option to redirect to the correct API call. Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
8f26b3910d
commit
25a9583634
@ -11,6 +11,7 @@ use PVE::Cluster;
|
||||
use PVE::RRD;
|
||||
use PVE::Storage;
|
||||
use PVE::API2::Storage::Content;
|
||||
use PVE::API2::Storage::PruneBackups;
|
||||
use PVE::RESTHandler;
|
||||
use PVE::RPCEnvironment;
|
||||
use PVE::JSONSchema qw(get_standard_option);
|
||||
@ -18,6 +19,11 @@ use PVE::Exception qw(raise_param_exc);
|
||||
|
||||
use base qw(PVE::RESTHandler);
|
||||
|
||||
__PACKAGE__->register_method ({
|
||||
subclass => "PVE::API2::Storage::PruneBackups",
|
||||
path => '{storage}/prunebackups',
|
||||
});
|
||||
|
||||
__PACKAGE__->register_method ({
|
||||
subclass => "PVE::API2::Storage::Content",
|
||||
# set fragment delimiter (no subdirs) - we need that, because volume
|
||||
@ -214,6 +220,7 @@ __PACKAGE__->register_method ({
|
||||
{ subdir => 'upload' },
|
||||
{ subdir => 'rrd' },
|
||||
{ subdir => 'rrddata' },
|
||||
{ subdir => 'prunebackups' },
|
||||
];
|
||||
|
||||
return $res;
|
||||
|
||||
Reference in New Issue
Block a user