]> git.proxmox.com Git - pve-storage.git/commitdiff
api: list thin pools: add volume group to properties
authorFabian Ebner <f.ebner@proxmox.com>
Mon, 25 Oct 2021 13:47:46 +0000 (15:47 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 10 Nov 2021 11:35:25 +0000 (12:35 +0100)
So that DELETE can be called using only information from GET.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/API2/Disks/LVMThin.pm
PVE/Storage/LvmThinPlugin.pm

index 83ebc46d8bc2812292e306fa30e4f1021a6385d3..ced4b6a149e4fc3f0aded96edbca5421d04c0a53 100644 (file)
@@ -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.',
index c24af22be55ee8d02359b433a928c62e06417444..b0cf3d2701ad22fa77cba4a2386ff861c8aeaa1f 100644 (file)
@@ -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;
        }
     }