[pdm-devel] [PATCH datacenter-manager 1/7] pbs-client: add `list_domains`

Lukas Wagner l.wagner at proxmox.com
Mon Dec 29 14:44:39 CET 2025


This one allows us to enumerate available authentication realms.

Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
---
 server/src/pbs_client.rs | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/server/src/pbs_client.rs b/server/src/pbs_client.rs
index f4f1f820..52cdcfd9 100644
--- a/server/src/pbs_client.rs
+++ b/server/src/pbs_client.rs
@@ -13,7 +13,7 @@ use proxmox_router::stream::JsonRecords;
 use proxmox_schema::api;
 use proxmox_section_config::typed::SectionConfigData;
 
-use pbs_api_types::{Authid, Tokenname, Userid};
+use pbs_api_types::{Authid, BasicRealmInfo, Tokenname, Userid};
 
 use pdm_api_types::remotes::{Remote, RemoteType};
 
@@ -159,6 +159,12 @@ impl PbsClient {
         Ok(self.0.get("/api2/extjs/version").await?.expect_json()?.data)
     }
 
+    /// List available authentication realms (domains).
+    pub async fn list_domains(&self) -> Result<Vec<BasicRealmInfo>, Error> {
+        let url = "/api2/extjs/access/domains";
+        Ok(self.0.get(url).await?.expect_json()?.data)
+    }
+
     /// List the datastores.
     pub async fn list_datastores(&self) -> Result<Vec<pbs_api_types::DataStoreConfig>, Error> {
         let path = "/api2/extjs/config/datastore";
-- 
2.47.3





More information about the pdm-devel mailing list