mirror of
git://git.proxmox.com/git/pve-storage.git
synced 2025-02-09 09:57:38 +03:00
storage : has_feature
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
parent
e8acaa3c0d
commit
99473759b2
@ -183,6 +183,21 @@ sub volume_snapshot_delete {
|
||||
}
|
||||
}
|
||||
|
||||
sub volume_has_feature {
|
||||
my ($cfg, $feature, $volid, $snap, $running) = @_;
|
||||
|
||||
my ($storeid, $volname) = parse_volume_id($volid, 1);
|
||||
if ($storeid) {
|
||||
my $scfg = storage_config($cfg, $storeid);
|
||||
my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
|
||||
return $plugin->volume_has_feature($scfg, $feature, $storeid, $volname, $snap, $running);
|
||||
} elsif ($volid =~ m|^(/.+)$| && -e $volid) {
|
||||
return undef;
|
||||
} else {
|
||||
return undef;
|
||||
}
|
||||
}
|
||||
|
||||
sub get_image_dir {
|
||||
my ($cfg, $storeid, $vmid) = @_;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user