this will be used in the gui, for selecting/creating disks/mps/etc. this means, that we get the information about a storage from the backend, instead of hardcoding types in the frontend (like the lun selector for iscsi)
Signed-off-by: Dominik Csapak <d.csa...@proxmox.com> --- PVE/API2.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/PVE/API2.pm b/PVE/API2.pm index 9aad03b1..329b6b79 100644 --- a/PVE/API2.pm +++ b/PVE/API2.pm @@ -185,6 +185,16 @@ __PACKAGE__->register_method ({ $res->{$k} = $vi->{$k}; } + # get storage formats, including custom plugins + my $storages = {}; + my $storagetypes = PVE::Storage::Plugin->lookup_types(); + foreach my $type (@$storagetypes) { + my $plugin = PVE::Storage::Plugin->lookup($type); + $storages->{$type} = $plugin->plugindata(); + } + + $res->{storagetypes} = $storages; + # get api permissions $res->{cap} = $compute_api_permission->($rpcenv); -- 2.11.0 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel