5
0
mirror of git://git.proxmox.com/git/pve-storage.git synced 2025-01-12 09:18:01 +03:00

implement complete_volume

This commit is contained in:
Dietmar Maurer 2015-10-01 07:59:05 +02:00
parent 98437f4c85
commit bf7aed2674

View File

@ -1234,4 +1234,23 @@ sub complete_content_type {
return [qw(rootdir images vztmpl iso backup)];
}
sub complete_volume {
my ($cmdname, $pname, $cvalue) = @_;
my $cfg = config();
my $storage_list = complete_storage_enabled();
my $res = [];
foreach my $storeid (@$storage_list) {
my $vollist = PVE::Storage::volume_list($cfg, $storeid);
foreach my $item (@$vollist) {
push @$res, $item->{volid};
}
}
return $res;
}
1;