Signed-off-by: Max R. Carrara <[email protected]>
---
 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



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

Reply via email to