From a76d3c973fe3e497fbdd4663fd36e31641b6a922 Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Tue, 5 Feb 2013 12:55:46 +0100 Subject: [PATCH] sheepdog : sheepdog_ls : parse base volumes Signed-off-by: Alexandre Derumier --- PVE/Storage/SheepdogPlugin.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PVE/Storage/SheepdogPlugin.pm b/PVE/Storage/SheepdogPlugin.pm index 50edfb0..4344e87 100644 --- a/PVE/Storage/SheepdogPlugin.pm +++ b/PVE/Storage/SheepdogPlugin.pm @@ -59,11 +59,11 @@ sub sheepdog_ls { run_command($cmd, outfunc => sub { my $line = shift; $line = trim($line); - if ($line =~ /(=|c) (vm-(\d+)-\S+)\s+(\d+)\s+(\d+)\s(\d+)\s(\d+)\s(\d+)\s(\S+)\s(\d+)/) { + if ($line =~ /(=|c) ((vm|base)-(\d+)-\S+)\s+(\d+)\s+(\d+)\s(\d+)\s(\d+)\s(\d+)\s(\S+)\s(\d+)/) { my $image = $2; - my $owner = $3; - my $size = $4; - my $idvdi = $9; + my $owner = $4; + my $size = $5; + my $idvdi = $10; my $parentid = $relationship->{$idvdi}->{parent} if $relationship->{$idvdi}->{parent}; my $parent = $relationship->{$parentid}->{name} if $parentid; $list->{$storeid}->{$image} = { -- 2.39.2