From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id EFCB61FF165 for ; Wed, 29 Jan 2025 11:51:47 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 4D3301FC9D; Wed, 29 Jan 2025 11:51:46 +0100 (CET) From: Dominik Csapak To: pdm-devel@lists.proxmox.com Date: Wed, 29 Jan 2025 11:51:41 +0100 Message-Id: <20250129105142.1291843-3-d.csapak@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250129105142.1291843-1-d.csapak@proxmox.com> References: <20250129105142.1291843-1-d.csapak@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.019 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [lib.rs] Subject: [pdm-devel] [RFC PATCH datacenter-manager 2/3] pdm-client: add bulk_start method X-BeenThere: pdm-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Datacenter Manager development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Datacenter Manager development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" Signed-off-by: Dominik Csapak --- lib/pdm-client/src/lib.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/pdm-client/src/lib.rs b/lib/pdm-client/src/lib.rs index a41b82c..962c76e 100644 --- a/lib/pdm-client/src/lib.rs +++ b/lib/pdm-client/src/lib.rs @@ -7,7 +7,7 @@ use pdm_api_types::resource::{PveResource, RemoteResources, TopEntities}; use pdm_api_types::rrddata::{ LxcDataPoint, NodeDataPoint, PbsDatastoreDataPoint, PbsNodeDataPoint, QemuDataPoint, }; -use pdm_api_types::BasicRealmInfo; +use pdm_api_types::{BasicRealmInfo, UPID}; use pve_api_types::StartQemuMigrationType; use serde::{Deserialize, Serialize}; use serde_json::{json, Value}; @@ -447,6 +447,13 @@ impl PdmClient { .await } + pub async fn pve_bulk_start(&self, remote: &str, vmid_list: Vec) -> Result { + let path = format!("/api2/extjs/pve/remotes/{remote}/bulk-start"); + let mut request = json!({}); + request["vmid-list"] = vmid_list.into(); + Ok(self.0.post(&path, &request).await?.expect_json()?.data) + } + pub async fn pve_qemu_shutdown( &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