From d70e7f6c0df63ec8fd16172dd1caca9310984739 Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Mon, 18 Jun 2012 14:06:39 +0200 Subject: [PATCH] rbd : add owner attribute when rbs ls Signed-off-by: Alexandre Derumier --- PVE/Storage/RBDPlugin.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm index fca4664..ad56c17 100644 --- a/PVE/Storage/RBDPlugin.pm +++ b/PVE/Storage/RBDPlugin.pm @@ -31,12 +31,18 @@ sub rbd_ls{ $line = trim($line); my ($image) = $line; - + + my $owner; + if ($image =~ m/^(vm-(\d+)-\S+)$/) { + $owner = $2; + } + $list->{$rbdpool}->{$image} = { name => $image, - size => "", + size => "", + vmid => $owner }; - + }); }; -- 2.39.2