nexenta: fix lun number parsing in sub path

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier
2012-08-21 14:43:44 +02:00
committed by Dietmar Maurer
parent 0f94c1c938
commit 034e4411bf

View File

@ -198,7 +198,8 @@ sub path {
my $map = nexenta_list_lun_mapping_entries($name,$scfg);
die "could not find lun number" if !$map;
my $lun = @$map[0]->{lun};
$lun =~ m/^(\d+)$/ or die "lun is not OK\n";
$lun = $1;
my $path = "iscsi://$portal/$target/$lun";
return ($path, $vmid, $vtype);