all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Shannon Sterz <s.sterz@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [PATCH datacenter-manager 2/6] pdm-client: add function to query the PDM hosts certificate info
Date: Wed, 27 May 2026 14:52:13 +0200	[thread overview]
Message-ID: <20260527125217.260760-3-s.sterz@proxmox.com> (raw)
In-Reply-To: <20260527125217.260760-1-s.sterz@proxmox.com>

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
 lib/pdm-client/src/lib.rs | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/lib/pdm-client/src/lib.rs b/lib/pdm-client/src/lib.rs
index 62177d8..e1b9242 100644
--- a/lib/pdm-client/src/lib.rs
+++ b/lib/pdm-client/src/lib.rs
@@ -17,7 +17,7 @@ use pdm_api_types::rrddata::{
     QemuDataPoint,
 };
 use pdm_api_types::sdn::{ListVnet, ListZone};
-use pdm_api_types::BasicRealmInfo;
+use pdm_api_types::{BasicRealmInfo, CertificateInfo};
 use pve_api_types::StartQemuMigrationType;
 use serde::{Deserialize, Serialize};
 use serde_json::{json, Value};
@@ -2199,6 +2199,16 @@ impl<T: HttpApiClient> PdmClient<T> {
             .nodata()?;
         Ok(())
     }
+
+    /// Get the current certificat's information for the PDM host itself.
+    pub async fn certificate_info(&self) -> Result<Vec<CertificateInfo>, Error> {
+        Ok(self
+            .0
+            .get("/api2/extjs/nodes/localhost/certificates/info")
+            .await?
+            .expect_json::<Vec<CertificateInfo>>()?
+            .data)
+    }
 }
 
 /// Builder for migration parameters.
-- 
2.47.3





  parent reply	other threads:[~2026-05-27 12:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-27 12:52 [PATCH datacenter-manager 0/6] improve handling of base url and certificate fingerprint for auto-installer gui Shannon Sterz
2026-05-27 12:52 ` [PATCH datacenter-manager 1/6] server: api: certificates: allow anybody to query the certificate info Shannon Sterz
2026-05-27 14:12   ` Filip Schauer
2026-05-27 14:16     ` Lukas Wagner
2026-05-27 14:17       ` Shannon Sterz
2026-05-27 12:52 ` Shannon Sterz [this message]
2026-05-27 12:52 ` [PATCH datacenter-manager 3/6] ui: remotes: auto-installer: set pdm_origin() as placeholder not tip Shannon Sterz
2026-05-27 12:52 ` [PATCH datacenter-manager 4/6] ui: remotes: auto-installer: use pdm_origin() to set initial pdm url Shannon Sterz
2026-05-27 12:52 ` [PATCH datacenter-manager 5/6] ui: auto-installer: load fingerprint and use it as initial value Shannon Sterz
2026-05-27 12:52 ` [PATCH datacenter-manager 6/6] ui: auto-installer: use info from answer to format preparation command Shannon Sterz
2026-05-27 13:11 ` [PATCH datacenter-manager 0/6] improve handling of base url and certificate fingerprint for auto-installer gui Lukas Wagner
2026-05-27 14:02 ` 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=20260527125217.260760-3-s.sterz@proxmox.com \
    --to=s.sterz@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal