From: Lukas Wagner <l.wagner@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager v2 3/4] cli: admin: add 'report' command to generate a system report
Date: Mon, 1 Dec 2025 16:32:28 +0100 [thread overview]
Message-ID: <20251201153229.347742-4-l.wagner@proxmox.com> (raw)
In-Reply-To: <20251201153229.347742-1-l.wagner@proxmox.com>
This adds the 'proxmox-datacenter-manager-admin report' command, which
prints the system report to the console.
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Stefan Hanreich <s.hanreich@proxmox.com>
Reviewed-by: Shannon Sterz <s.sterz@proxmox.com>
Tested-by: Shannon Sterz <s.sterz@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
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next prev parent reply other threads:[~2025-12-01 15:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 15:32 [pdm-devel] [PATCH datacenter-manager v2 0/4] system report via admin cli or API Lukas Wagner
2025-12-01 15:32 ` [pdm-devel] [PATCH datacenter-manager v2 1/4] server: add system report implementation Lukas Wagner
2025-12-01 15:32 ` [pdm-devel] [PATCH datacenter-manager v2 2/4] api: add system report API Lukas Wagner
2025-12-01 15:32 ` Lukas Wagner [this message]
2025-12-01 15:32 ` [pdm-devel] [PATCH datacenter-manager v2 4/4] pdm-client: add bindings for system report generation Lukas Wagner
2025-12-01 15:42 ` [pdm-devel] [PATCH datacenter-manager v2 0/4] system report via admin cli or API Shannon Sterz
2025-12-01 18:26 ` [pdm-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251201153229.347742-4-l.wagner@proxmox.com \
--to=l.wagner@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox