sheepdog : parse_volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
c78cb110e7
commit
648095a9db
@ -123,8 +123,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