[pdm-devel] [PATCH datacenter-manager 03/13] pbs-client: add bindings for /nodes/localhost/apt/repositories

Lukas Wagner l.wagner at proxmox.com
Thu Nov 27 11:44:37 CET 2025


This enables us to query a list of configured APT repositories.

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

diff --git a/server/src/pbs_client.rs b/server/src/pbs_client.rs
index 3a899084..f4f1f820 100644
--- a/server/src/pbs_client.rs
+++ b/server/src/pbs_client.rs
@@ -363,6 +363,14 @@ impl PbsClient {
             .data)
     }
 
+    /// Get APT repository information.
+    pub async fn get_apt_repositories(
+        &self,
+    ) -> Result<pbs_api_types::APTRepositoriesResult, Error> {
+        let url = "/api2/extjs/nodes/localhost/apt/repositories";
+        Ok(self.0.get(url).await?.expect_json()?.data)
+    }
+
     /// Get list of tasks.
     ///
     /// `params`: Filters specifying which tasks to get.
-- 
2.47.3





More information about the pdm-devel mailing list