]> git.proxmox.com Git - pve-storage.git/commitdiff
sheepdog : sheepdog_ls : parse base volumes
authorAlexandre Derumier <aderumier@odiso.com>
Tue, 5 Feb 2013 11:55:46 +0000 (12:55 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 14 Feb 2013 09:17:06 +0000 (10:17 +0100)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/Storage/SheepdogPlugin.pm

index 50edfb0d9d35a973d3455b43187f13d9ed71d884..4344e87adf35c82c2ea89c4524ee491b99c5b48c 100644 (file)
@@ -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} = {