]> git.proxmox.com Git - pve-storage.git/commitdiff
rbd : rbd_ls : parse base
authorAlexandre Derumier <aderumier@odiso.com>
Tue, 5 Feb 2013 11:55:30 +0000 (12:55 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 14 Feb 2013 07:58:49 +0000 (08:58 +0100)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
PVE/Storage/RBDPlugin.pm

index 2eb55bad42a9685e8a5c01d2e13129096bd16afa..301f64da15a3c4aaa6edacf6f4706d5fd398bbad 100644 (file)
@@ -59,8 +59,8 @@ sub rbd_ls {
     my $parser = sub {
        my $line = shift;
 
-       if ($line =~  m/^(vm-(\d+)-disk-\d+)\s+(\d+)(M|G|T)\s((\S+)\/(vm-\d+-\S+@\S+))?/) {
-           my ($image, $owner, $size, $unit, $parent) = ($1, $2, $3, $4, $7);
+       if ($line =~  m/^((vm|base)-(\d+)-disk-\d+)\s+(\d+)(M|G|T)\s((\S+)\/((vm|base)-\d+-\S+@\S+))?/) {
+           my ($image, $owner, $size, $unit, $parent) = ($1, $3, $4, $5, $8);
 
            $list->{$scfg->{pool}}->{$image} = {
                name => $image,