[RFC PATCH datacenter-manager 1/3] pdm-client: add `list_views` function to fetch views list

Shan Shaji
2026-03-25T15:36:15Z

Signed-off-by: Shan Shaji <s.shaji@proxmox.com>
---
lib/pdm-client/src/lib.rs | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/lib/pdm-client/src/lib.rs b/lib/pdm-client/src/lib.rs
index 0fee97a..1565869 100644
--- a/lib/pdm-client/src/lib.rs
+++ b/lib/pdm-client/src/lib.rs
@@ -1366,6 +1366,16 @@ impl<T: HttpApiClient> PdmClient<T> {
.expect_json()?
.data)
}
+
+ /// Get the list of views.
+ pub async fn list_views(&self) -> Result<Vec<pdm_api_types::views::ViewConfig>, Error> {
+ Ok(self
+ .0
+ .get("/api2/extjs/config/views")
+ .await?
+ .expect_json()?
+ .data)
+ }
}

/// Builder for migration parameters.
--
2.47.3