[pve-devel] [PATCH manager v4 1/2] api: ceph: add applications of each pool to the lspools endpoint

Stefan Sterz s.sterz at proxmox.com
Tue Oct 25 10:10:45 CEST 2022


since ceph luminous (ceph 12) pools need to be associated with at
least one applicaton. expose this information here too so that clients
of this endpoint can use it.

Signed-off-by: Stefan Sterz <s.sterz at proxmox.com>
---
v3: add an api viewer entry for the applications object.
v4: re-use the 'osd dump' command's result instead of issueing another 
    command.

thanks @ alwin antreich for pointing out that pools have applications!

 PVE/API2/Ceph/Pools.pm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/PVE/API2/Ceph/Pools.pm b/PVE/API2/Ceph/Pools.pm
index 6c05250e..fce56787 100644
--- a/PVE/API2/Ceph/Pools.pm
+++ b/PVE/API2/Ceph/Pools.pm
@@ -125,6 +125,11 @@ __PACKAGE__->register_method ({
 		    title => 'Autoscale Status',
 		    optional => 1,
 		},
+		application_metadata => {
+		    type => 'object',
+		    title => 'Associated Applications',
+		    optional => 1,
+		},
 	    },
 	},
 	links => [ { rel => 'child', href => "{pool_name}" } ],
@@ -162,6 +167,7 @@ __PACKAGE__->register_method ({
 	    'pg_num',
 	    'crush_rule',
 	    'pg_autoscale_mode',
+	    'application_metadata',
 	];
 
 	# pg_autoscaler module is not enabled in Nautilus
-- 
2.30.2






More information about the pve-devel mailing list