zfs: ZFSDirPlugin add methode path

Signed-off-by: Wolfgang Link <w.link@proxmox.com>
This commit is contained in:
Wolfgang Link
2015-01-23 10:32:41 +01:00
committed by Dietmar Maurer
parent ca04180f3b
commit f3e632d073

View File

@ -132,6 +132,22 @@ sub parse_volname {
# virtual zfs methods (subclass can overwrite them)
sub path {
my ($class, $scfg, $volname) = @_;
my ($vtype, $name, $vmid) = $class->parse_volname($volname);
my $path = '';
if($vtype eq "images"){
$path = "/dev/zvol/$scfg->{pool}/$volname";
} else {
die "$vtype is not allowed in ZFSDir!";
}
return ($path, $vmid, $vtype);
}
sub zfs_request {
my ($class, $scfg, $timeout, $method, @params) = @_;