storage: add parse_volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
bc9ff45e9e
commit
ec4b0dc781
@ -259,6 +259,17 @@ sub parse_vmid {
|
|||||||
return int($vmid);
|
return int($vmid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub parse_volname {
|
||||||
|
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->parse_volname($volname);
|
||||||
|
}
|
||||||
|
|
||||||
sub parse_volume_id {
|
sub parse_volume_id {
|
||||||
my ($volid, $noerr) = @_;
|
my ($volid, $noerr) = @_;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user