From 20ccac1b6d07879feb3c0d26b3a0ed9c8addaec8 Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Fri, 27 Jul 2012 08:00:12 +0200 Subject: [PATCH] add volume_size_info sub Signed-off-by: Alexandre Derumier --- PVE/Storage.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index 92dcc54..60cc53d 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -114,6 +114,16 @@ sub file_size_info { return PVE::Storage::Plugin::file_size_info($filename, $timeout); } +sub volume_size_info { + my ($cfg, $volid, $timeout) = @_; + + my ($storeid, $volname) = parse_volume_id($volid); + + my $scfg = storage_config($cfg, $storeid); + my $plugin = PVE::Storage::Plugin->lookup($scfg->{type}); + return $plugin->volume_size_info($scfg, $storeid, $volname, $timeout); +} + sub get_image_dir { my ($cfg, $storeid, $vmid) = @_; @@ -455,6 +465,7 @@ sub template_list { return $res; } + sub vdisk_list { my ($cfg, $storeid, $vmid, $vollist) = @_;