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:
parent
98437f4c85
commit
bf7aed2674
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user