add API for LVMThin management

like the LVM API, but return an array for the list,
because we do not have nested data here

and create a vg and thin lv with the name given and use the full size

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2018-07-30 10:26:05 +02:00
committed by Dietmar Maurer
parent 2c2fd98b87
commit 0ea9f3844e
3 changed files with 150 additions and 1 deletions

View File

@ -9,6 +9,7 @@ use HTTP::Status qw(:constants);
use PVE::JSONSchema qw(get_standard_option);
use PVE::API2::Disks::LVM;
use PVE::API2::Disks::LVMThin;
use PVE::RESTHandler;
@ -19,6 +20,11 @@ __PACKAGE__->register_method ({
path => 'lvm',
});
__PACKAGE__->register_method ({
subclass => "PVE::API2::Disks::LVMThin",
path => 'lvmthin',
});
__PACKAGE__->register_method ({
name => 'index',
path => '',
@ -48,6 +54,7 @@ __PACKAGE__->register_method ({
{ name => 'initgpt' },
{ name => 'smart' },
{ name => 'lvm' },
{ name => 'lvmthin' },
];
return $result;