[pdm-devel] [PATCH datacenter-manager v2 3/4] cli: admin: add 'report' command to generate a system report
Lukas Wagner
l.wagner at proxmox.com
Mon Dec 1 16:32:28 CET 2025
This adds the 'proxmox-datacenter-manager-admin report' command, which
prints the system report to the console.
Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
Tested-by: Stefan Hanreich <s.hanreich at proxmox.com>
Reviewed-by: Shannon Sterz <s.sterz at proxmox.com>
Tested-by: Shannon Sterz <s.sterz at proxmox.com>
---
cli/admin/src/main.rs | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/cli/admin/src/main.rs b/cli/admin/src/main.rs
index 19d387f8..e6a74df2 100644
--- a/cli/admin/src/main.rs
+++ b/cli/admin/src/main.rs
@@ -32,6 +32,10 @@ fn main() {
let cmd_def = CliCommandMap::new()
.insert("remote", remotes::cli())
+ .insert(
+ "report",
+ CliCommand::new(&API_METHOD_GENERATE_SYSTEM_REPORT),
+ )
.insert("versions", CliCommand::new(&API_METHOD_GET_VERSIONS));
let mut rpcenv = CliEnvironment::new();
@@ -83,3 +87,12 @@ async fn get_versions(verbose: bool, param: Value) -> Result<Value, anyhow::Erro
Ok(Value::Null)
}
+
+#[api]
+/// Generate the system report.
+async fn generate_system_report() -> Result<(), anyhow::Error> {
+ let report = server::api::nodes::report::generate_system_report()?;
+ print!("{report}");
+
+ Ok(())
+}
--
2.47.3
More information about the pdm-devel
mailing list