rbd : parse_volname : parse base
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
ff00afd7fb
commit
d04c7e55a8
@ -172,8 +172,8 @@ sub options {
|
|||||||
sub parse_volname {
|
sub parse_volname {
|
||||||
my ($class, $volname) = @_;
|
my ($class, $volname) = @_;
|
||||||
|
|
||||||
if ($volname =~ m/^(vm-(\d+)-\S+)$/) {
|
if ($volname =~ m/^((base-(\d+)-\S+)\/)?((base)?(vm)?-(\d+)-\S+)$/) {
|
||||||
return ('images', $1, $2);
|
return ('images', $4, $7, $2, $3, $5);
|
||||||
}
|
}
|
||||||
|
|
||||||
die "unable to parse rbd volume name '$volname'\n";
|
die "unable to parse rbd volume name '$volname'\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user