[pve-devel] [RFC pve-storage master v2 5/10] api: plugins/storage/plugin: add plugins' 'content' to their metadata
Max R. Carrara
m.carrara at proxmox.com
Fri Nov 21 17:58:34 CET 2025
Signed-off-by: Max R. Carrara <m.carrara at proxmox.com>
---
src/PVE/API2/Plugins/Storage/Plugin.pm | 27 ++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/src/PVE/API2/Plugins/Storage/Plugin.pm b/src/PVE/API2/Plugins/Storage/Plugin.pm
index 457c070..6db9ffc 100644
--- a/src/PVE/API2/Plugins/Storage/Plugin.pm
+++ b/src/PVE/API2/Plugins/Storage/Plugin.pm
@@ -18,6 +18,27 @@ my $PLUGIN_METADATA_SCHEMA = {
type => 'object',
additionalProperties => 0,
properties => {
+ content => {
+ type => 'object',
+ optional => 0,
+ properties => {
+ supported => {
+ type => 'array',
+ optional => 0,
+ items => {
+ type => 'string',
+ },
+ },
+ default => {
+ type => 'array',
+ optional => 0,
+ items => {
+ type => 'string',
+ },
+ },
+ },
+ additionalProperties => 0,
+ },
module => {
type => 'string',
optional => 0,
@@ -71,7 +92,13 @@ my sub build_plugin_metadata : prototype($) ($type) {
raise("Plugin '$type' not found - $@", code => HTTP_NOT_FOUND);
}
+ my $plugindata = $plugin->plugindata();
+
return {
+ content => {
+ supported => [sort keys $plugindata->{content}->[0]->%*],
+ default => [sort keys $plugindata->{content}->[1]->%*],
+ },
module => $plugin,
schema => get_schema_for_plugin($plugin),
type => $type,
--
2.47.3
More information about the pve-devel
mailing list