[pbs-devel] [PATCH proxmox-backup 3/4] api: datastore: expose the datastore backend type in the status output
Christian Ebner
c.ebner at proxmox.com
Thu Jul 31 09:39:49 CEST 2025
By including the datastore's backend type, the data fetched via the api
can be interpreted based on the configured backend, allowing to switch
elements on the ui such as labels.
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
src/api2/admin/datastore.rs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/api2/admin/datastore.rs b/src/api2/admin/datastore.rs
index 8f1d0e07b..5c0d3fa13 100644
--- a/src/api2/admin/datastore.rs
+++ b/src/api2/admin/datastore.rs
@@ -725,6 +725,8 @@ pub async fn status(
(None, None)
};
+ let backend_type = datastore.backend_type();
+
Ok(if store_stats {
let storage = crate::tools::fs::fs_info(datastore.base_path()).await?;
DataStoreStatus {
@@ -733,6 +735,7 @@ pub async fn status(
avail: storage.available,
gc_status,
counts,
+ backend_type,
}
} else {
DataStoreStatus {
@@ -741,6 +744,7 @@ pub async fn status(
avail: 0,
gc_status,
counts,
+ backend_type,
}
})
}
--
2.47.2
More information about the pbs-devel
mailing list