add API for add Directory storage

creates/lists systemd mount units for /mnt/pve/.*
filetypes allowed are ext4 and xfs for now
mount with /dev/disk/by-uuid

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2018-07-30 10:26:06 +02:00
committed by Dietmar Maurer
parent fc1880566c
commit 793d720cd2
3 changed files with 299 additions and 1 deletions

View File

@ -10,6 +10,7 @@ use PVE::JSONSchema qw(get_standard_option);
use PVE::API2::Disks::LVM;
use PVE::API2::Disks::LVMThin;
use PVE::API2::Disks::Directory;
use PVE::RESTHandler;
@ -25,6 +26,11 @@ __PACKAGE__->register_method ({
path => 'lvmthin',
});
__PACKAGE__->register_method ({
subclass => "PVE::API2::Disks::Directory",
path => 'directory',
});
__PACKAGE__->register_method ({
name => 'index',
path => '',
@ -55,6 +61,7 @@ __PACKAGE__->register_method ({
{ name => 'smart' },
{ name => 'lvm' },
{ name => 'lvmthin' },
{ name => 'directory' },
];
return $result;