all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Lukas Wagner <l.wagner@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [PATCH datacenter-manager v2 1/7] pbs-client: add `list_domains`
Date: Tue, 24 Feb 2026 10:59:07 +0100	[thread overview]
Message-ID: <20260224095913.73320-2-l.wagner@proxmox.com> (raw)
In-Reply-To: <20260224095913.73320-1-l.wagner@proxmox.com>

This one allows us to enumerate available authentication realms.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Shan Shaji <s.shaji@proxmox.com>
Tested-by: Shan Shaji <s.shaji@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





  reply	other threads:[~2026-02-24  9:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24  9:59 [PATCH datacenter-manager v2 0/7] fix #7192: properly enumerate PBS realms in 'Add Remote' wizard Lukas Wagner
2026-02-24  9:59 ` Lukas Wagner [this message]
2026-02-24  9:59 ` [PATCH datacenter-manager v2 2/7] api: pbs: add /pbs/realms endpoint Lukas Wagner
2026-02-24  9:59 ` [PATCH datacenter-manager v2 3/7] ui: rename pve_realm_selector module to remote_realm_selector Lukas Wagner
2026-02-24  9:59 ` [PATCH datacenter-manager v2 4/7] ui: widgets: rename PveRealmSelector to RemoteRealmSelector Lukas Wagner
2026-02-24  9:59 ` [PATCH datacenter-manager v2 5/7] ui: widgets: make RemoteRealmSelectorComp private Lukas Wagner
2026-02-24  9:59 ` [PATCH datacenter-manager v2 6/7] ui: widget: remote realm selector: add missing docstrings Lukas Wagner
2026-02-24  9:59 ` [PATCH datacenter-manager v2 7/7] ui: widgets: remote realm selector: support PBS remotes Lukas Wagner

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=20260224095913.73320-2-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 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