From 9eb914de163d5aeeeb384a297df7f31b5848b062 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Mon, 8 Sep 2025 16:04:08 +0200 Subject: [PATCH] api: status: document return types this is useful, e.g. when we want to generate bindings for this api call Signed-off-by: Dominik Csapak --- src/PVE/API2/Storage/Status.pm | 45 +++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/src/PVE/API2/Storage/Status.pm b/src/PVE/API2/Storage/Status.pm index ad8c753..7bde4ec 100644 --- a/src/PVE/API2/Storage/Status.pm +++ b/src/PVE/API2/Storage/Status.pm @@ -300,7 +300,50 @@ __PACKAGE__->register_method({ }, returns => { type => "object", - properties => {}, + properties => { + type => { + description => "Storage type.", + type => 'string', + }, + content => { + description => "Allowed storage content types.", + type => 'string', + format => 'pve-storage-content-list', + }, + enabled => { + description => "Set when storage is enabled (not disabled).", + type => 'boolean', + optional => 1, + }, + active => { + description => "Set when storage is accessible.", + type => 'boolean', + optional => 1, + }, + shared => { + description => "Shared flag from storage configuration.", + type => 'boolean', + optional => 1, + }, + total => { + description => "Total storage space in bytes.", + type => 'integer', + renderer => 'bytes', + optional => 1, + }, + used => { + description => "Used storage space in bytes.", + type => 'integer', + renderer => 'bytes', + optional => 1, + }, + avail => { + description => "Available storage space in bytes.", + type => 'integer', + renderer => 'bytes', + optional => 1, + }, + }, }, code => sub { my ($param) = @_;