plugin: add volume_snapshot_info function

which allows for better choices of common replication snapshots.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fabian Ebner
2021-10-19 09:54:50 +02:00
committed by Fabian Grünbichler
parent 665f61a24b
commit 8c20d8afa3
3 changed files with 41 additions and 0 deletions

View File

@ -371,6 +371,15 @@ sub volume_has_feature {
}
}
sub volume_snapshot_info {
my ($cfg, $volid) = @_;
my ($storeid, $volname) = parse_volume_id($volid);
my $scfg = storage_config($cfg, $storeid);
my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
return $plugin->volume_snapshot_info($scfg, $storeid, $volname);
}
sub volume_snapshot_list {
my ($cfg, $volid) = @_;