[pve-devel] [PATCH] rbd : add owner attribute when rbs ls
Alexandre Derumier
aderumier at odiso.com
Mon Jun 18 14:06:39 CEST 2012
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/Storage/RBDPlugin.pm | 12 +++++++++---
1 files 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
};
-
+
});
};
--
1.7.2.5
More information about the pve-devel
mailing list