From: Dominik Csapak <d.csapak@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager 6/9] pdm-client: add cluster status method
Date: Mon, 13 Jan 2025 16:45:47 +0100 [thread overview]
Message-ID: <20250113154550.3462139-9-d.csapak@proxmox.com> (raw)
In-Reply-To: <20250113154550.3462139-1-d.csapak@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
lib/pdm-client/src/lib.rs | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/lib/pdm-client/src/lib.rs b/lib/pdm-client/src/lib.rs
index 14e6fc8..4ef560e 100644
--- a/lib/pdm-client/src/lib.rs
+++ b/lib/pdm-client/src/lib.rs
@@ -52,6 +52,8 @@ pub mod types {
};
pub use pve_api_types::ListRealm;
+
+ pub use pve_api_types::ClusterNodeStatus;
}
pub struct PdmClient<T: HttpApiClient>(pub T);
@@ -347,6 +349,16 @@ impl<T: HttpApiClient> PdmClient<T> {
Ok(self.0.get(&query).await?.expect_json()?.data)
}
+ pub async fn pve_cluster_status(
+ &self,
+ remote: &str,
+ target_endpoint: Option<&str>,
+ ) -> Result<Vec<ClusterNodeStatus>, Error> {
+ let mut query = format!("/api2/extjs/pve/remotes/{remote}/cluster-status");
+ add_query_arg(&mut query, &mut '?', "target-endpoint", &target_endpoint);
+ Ok(self.0.get(&query).await?.expect_json()?.data)
+ }
+
pub async fn pve_list_qemu(
&self,
remote: &str,
--
2.39.5
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next prev parent reply other threads:[~2025-01-13 15:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-13 15:45 [pdm-devel] [PATCH proxmox-api-types/datacenter-manager] remote migration: make target endpoint selectable Dominik Csapak
2025-01-13 15:45 ` [pdm-devel] [PATCH proxmox-api-types 1/2] add more network interface methods Dominik Csapak
2025-01-13 15:45 ` [pdm-devel] [PATCH proxmox-api-types 2/2] add cluster status api call Dominik Csapak
2025-01-13 15:45 ` [pdm-devel] [PATCH datacenter-manager 1/9] server: factor qemu/lxc code into own modules Dominik Csapak
2025-01-13 15:45 ` [pdm-devel] [PATCH datacenter-manager 2/9] server: api: fix remote upid tracking for qemu remote migration Dominik Csapak
2025-01-13 15:45 ` [pdm-devel] [PATCH datacenter-manager 3/9] server: connection: add new function that allows for explicit endpoint Dominik Csapak
2025-01-13 15:45 ` [pdm-devel] [PATCH datacenter-manager 4/9] server: api: add target-endpoint parameter to remote migrate api calls Dominik Csapak
2025-01-13 15:45 ` [pdm-devel] [PATCH datacenter-manager 5/9] server: api: pve: add remote cluster-status api call Dominik Csapak
2025-01-13 15:45 ` Dominik Csapak [this message]
2025-01-13 15:45 ` [pdm-devel] [PATCH datacenter-manager 7/9] pdm-client: add target-endpoint parameter to remote migration methods Dominik Csapak
2025-01-13 15:45 ` [pdm-devel] [PATCH datacenter-manager 8/9] ui: widget: add remote endpoint selector Dominik Csapak
2025-01-13 15:45 ` [pdm-devel] [PATCH datacenter-manager 9/9] ui: migrate: make target endpoint selectable for remote migration Dominik Csapak
2025-01-14 9:35 ` [pdm-devel] [PATCH proxmox-api-types/datacenter-manager] remote migration: make target endpoint selectable Dietmar Maurer
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=20250113154550.3462139-9-d.csapak@proxmox.com \
--to=d.csapak@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox