fix indentation
This commit is contained in:
committed by
Dietmar Maurer
parent
9690e55e9b
commit
883d9b81f0
@ -489,31 +489,31 @@ sub list_images {
|
|||||||
my $res = [];
|
my $res = [];
|
||||||
|
|
||||||
if (my $dat = $cache->{rbd}->{$pool}) {
|
if (my $dat = $cache->{rbd}->{$pool}) {
|
||||||
foreach my $image (keys %$dat) {
|
foreach my $image (keys %$dat) {
|
||||||
|
|
||||||
my $volname = $dat->{$image}->{name};
|
my $volname = $dat->{$image}->{name};
|
||||||
my $parent = $dat->{$image}->{parent};
|
my $parent = $dat->{$image}->{parent};
|
||||||
|
|
||||||
if ($parent && $parent =~ m/^(base-\d+-\S+)\@__base__$/) {
|
if ($parent && $parent =~ m/^(base-\d+-\S+)\@__base__$/) {
|
||||||
$volname = "$1/$volname";
|
$volname = "$1/$volname";
|
||||||
}
|
}
|
||||||
|
|
||||||
my $volid = "$storeid:$volname";
|
my $volid = "$storeid:$volname";
|
||||||
|
|
||||||
my $owner = $dat->{$image}->{vmid};
|
my $owner = $dat->{$image}->{vmid};
|
||||||
if ($vollist) {
|
if ($vollist) {
|
||||||
my $found = grep { $_ eq $volid } @$vollist;
|
my $found = grep { $_ eq $volid } @$vollist;
|
||||||
next if !$found;
|
next if !$found;
|
||||||
} else {
|
} else {
|
||||||
next if defined ($vmid) && ($owner ne $vmid);
|
next if defined ($vmid) && ($owner ne $vmid);
|
||||||
}
|
}
|
||||||
|
|
||||||
my $info = $dat->{$image};
|
my $info = $dat->{$image};
|
||||||
$info->{volid} = $volid;
|
$info->{volid} = $volid;
|
||||||
$info->{format} = 'raw';
|
$info->{format} = 'raw';
|
||||||
|
|
||||||
push @$res, $info;
|
push @$res, $info;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
|
|||||||
Reference in New Issue
Block a user