sheepdog : volume_size_info: parse_volname
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
b22af8eee9
commit
61b8ccc917
@ -356,6 +356,9 @@ sub deactivate_volume {
|
||||
sub volume_size_info {
|
||||
my ($class, $scfg, $storeid, $volname, $timeout) = @_;
|
||||
|
||||
my ($vtype, $name, $vmid, $basename, $basevmid, $isBase) =
|
||||
$class->parse_volname($volname);
|
||||
|
||||
my $size = undef;
|
||||
|
||||
my $cmd = &$collie_cmd($scfg, 'vdi', 'list', '-r');
|
||||
@ -363,7 +366,7 @@ sub volume_size_info {
|
||||
run_command($cmd, outfunc => sub {
|
||||
my $line = shift;
|
||||
$line = trim($line);
|
||||
if ($line =~ /(=|c) $volname\s+(\d+)\s+(\d+)\s(\d+)\s(\d+)\s/) {
|
||||
if ($line =~ /(=|c) $name\s+(\d+)\s+(\d+)\s(\d+)\s(\d+)\s/) {
|
||||
$size = $3;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user