[pve-devel] [RFC manager] api: mapping: add storage mapping path

Mira Limbeck m.limbeck at proxmox.com
Mon Nov 10 18:01:22 CET 2025


Signed-off-by: Mira Limbeck <m.limbeck at proxmox.com>
---
 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




More information about the pve-devel mailing list