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

index 08945303cc1c3273d4b27761f587f6d447bd9214..e2df17d6a6788dc979f881f0698cb252238661a1 100644 (file)
@@ -279,8 +279,14 @@ sub list_images {
         foreach my $image (keys %$dat) {
 
             my $volname = $dat->{$image}->{name};
+            my $parent = $dat->{$image}->{parent};
 
-            my $volid = "$storeid:$volname";
+            my $volid = undef;
+            if ($parent && $parent ne $volname) {
+                $volid = "$storeid:$parent/$volname";
+            } else {
+                $volid = "$storeid:$volname";
+            }
 
             my $owner = $dat->{$volname}->{vmid};
             if ($vollist) {