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 <f.ebner@proxmox.com>
This commit is contained in:
committed by
Fabian Grünbichler
parent
b02db5fcea
commit
a510449e2b
@ -40,6 +40,10 @@ __PACKAGE__->register_method ({
|
|||||||
type => 'string',
|
type => 'string',
|
||||||
description => 'The name of the thinpool.',
|
description => 'The name of the thinpool.',
|
||||||
},
|
},
|
||||||
|
vg => {
|
||||||
|
type => 'string',
|
||||||
|
description => 'The associated volume group.',
|
||||||
|
},
|
||||||
lv_size => {
|
lv_size => {
|
||||||
type => 'integer',
|
type => 'integer',
|
||||||
description => 'The size of the thinpool in bytes.',
|
description => 'The size of the thinpool in bytes.',
|
||||||
|
|||||||
@ -184,6 +184,7 @@ sub list_thinpools {
|
|||||||
next if $lvs->{$vg}->{$lvname}->{lv_type} ne 't';
|
next if $lvs->{$vg}->{$lvname}->{lv_type} ne 't';
|
||||||
my $lv = $lvs->{$vg}->{$lvname};
|
my $lv = $lvs->{$vg}->{$lvname};
|
||||||
$lv->{lv} = $lvname;
|
$lv->{lv} = $lvname;
|
||||||
|
$lv->{vg} = $vg;
|
||||||
push @$thinpools, $lv;
|
push @$thinpools, $lv;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user