From a510449e2b34081e3b5d8b96720d59b6fd0143d7 Mon Sep 17 00:00:00 2001 From: Fabian Ebner Date: Mon, 25 Oct 2021 15:47:46 +0200 Subject: [PATCH] api: list thin pools: add volume group to properties So that DELETE can be called using only information from GET. Signed-off-by: Fabian Ebner --- PVE/API2/Disks/LVMThin.pm | 4 ++++ PVE/Storage/LvmThinPlugin.pm | 1 + 2 files changed, 5 insertions(+) diff --git a/PVE/API2/Disks/LVMThin.pm b/PVE/API2/Disks/LVMThin.pm index 83ebc46..ced4b6a 100644 --- a/PVE/API2/Disks/LVMThin.pm +++ b/PVE/API2/Disks/LVMThin.pm @@ -40,6 +40,10 @@ __PACKAGE__->register_method ({ type => 'string', description => 'The name of the thinpool.', }, + vg => { + type => 'string', + description => 'The associated volume group.', + }, lv_size => { type => 'integer', description => 'The size of the thinpool in bytes.', diff --git a/PVE/Storage/LvmThinPlugin.pm b/PVE/Storage/LvmThinPlugin.pm index c24af22..b0cf3d2 100644 --- a/PVE/Storage/LvmThinPlugin.pm +++ b/PVE/Storage/LvmThinPlugin.pm @@ -184,6 +184,7 @@ sub list_thinpools { next if $lvs->{$vg}->{$lvname}->{lv_type} ne 't'; my $lv = $lvs->{$vg}->{$lvname}; $lv->{lv} = $lvname; + $lv->{vg} = $vg; push @$thinpools, $lv; } } -- 2.39.2