prepare storage for lvmthin gui
this patch adds an lvmthin scan to the api, so that we can get a list of thinpools for a specific vg via an api call Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
a8f47479d5
commit
d0ea89e564
@ -163,6 +163,20 @@ sub list_images {
|
||||
return $res;
|
||||
}
|
||||
|
||||
sub list_thinpools {
|
||||
my ($vg) = @_;
|
||||
|
||||
my $lvs = PVE::Storage::LVMPlugin::lvm_list_volumes($vg);
|
||||
my $thinpools = [];
|
||||
|
||||
foreach my $lvname (keys %{$lvs->{$vg}}) {
|
||||
next if $lvs->{$vg}->{$lvname}->{lv_type} ne 't';
|
||||
push @$thinpools, { lv => $lvname };
|
||||
}
|
||||
|
||||
return $thinpools;
|
||||
}
|
||||
|
||||
sub status {
|
||||
my ($class, $storeid, $scfg, $cache) = @_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user