Signed-off-by: Mira Limbeck <[email protected]>
---
 PVE/API2/Cluster/Mapping.pm | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/PVE/API2/Cluster/Mapping.pm b/PVE/API2/Cluster/Mapping.pm
index e39a16832..7f96dd965 100644
--- a/PVE/API2/Cluster/Mapping.pm
+++ b/PVE/API2/Cluster/Mapping.pm
@@ -6,6 +6,7 @@ use warnings;
 use PVE::API2::Cluster::Mapping::Dir;
 use PVE::API2::Cluster::Mapping::PCI;
 use PVE::API2::Cluster::Mapping::USB;
+use PVE::API2::Storage::Mapping;
 
 use base qw(PVE::RESTHandler);
 
@@ -24,7 +25,12 @@ __PACKAGE__->register_method({
     path => 'usb',
 });
 
-__PACKAGE__->register_method({
+__PACKAGE__->register_method ({
+    subclass => "PVE::API2::Storage::Mapping",
+    path => 'storage',
+});
+
+__PACKAGE__->register_method ({
     name => 'index',
     path => '',
     method => 'GET',
@@ -46,9 +52,12 @@ __PACKAGE__->register_method({
     code => sub {
         my ($param) = @_;
 
-        my $result = [
-            { name => 'dir' }, { name => 'pci' }, { name => 'usb' },
-        ];
+       my $result = [
+           { name => 'dir' },
+           { name => 'pci' },
+           { name => 'usb' },
+           { name => 'storage' },
+       ];
 
         return $result;
     },
-- 
2.39.5


_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to