nexenta : parse_volname

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier
2013-02-05 12:55:59 +01:00
committed by Dietmar Maurer
parent d99eee9399
commit e7b2953b2f

View File

@ -180,8 +180,8 @@ sub options {
sub parse_volname {
my ($class, $volname) = @_;
if ($volname =~ m/^(vm-(\d+)-\S+)$/) {
return ('images', $1, $2);
if ($volname =~ m/^(((base|vm)-(\d+)-\S+)\/)?((base)?(vm)?-(\d+)-\S+)$/) {
return ('images', $5, $8, $2, $4, $6);
}
die "unable to parse nexenta volume name '$volname'\n";