From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id AB3441FF187 for ; Tue, 2 Dec 2025 12:47:08 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 98FAEDC50; Tue, 2 Dec 2025 12:47:33 +0100 (CET) Message-ID: Date: Tue, 2 Dec 2025 12:46:58 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta To: Proxmox Datacenter Manager development discussion , Dominik Csapak References: <20251202111533.2068448-1-d.csapak@proxmox.com> <20251202111533.2068448-4-d.csapak@proxmox.com> Content-Language: en-US From: Thomas Lamprecht In-Reply-To: <20251202111533.2068448-4-d.csapak@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1764675974296 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.171 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 POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes 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. [proxmox.com, lib.rs, mod.rs] Subject: Re: [pdm-devel] [PATCH datacenter-manager v2 1/3] lib/server: pve: add api call to get the cached version info from remotes 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" Am 02.12.25 um 12:15 schrieb Dominik Csapak: > this is useful when we e.g. want to feature gate some things in the ui. > This way we don't have to get the whole update information for all > remotes, and we don't have to query all nodes of the remotes for their > versions. > > Should we need it in the future, we can do the analagous api call for > pbs too. > > Signed-off-by: Dominik Csapak > --- > lib/pdm-client/src/lib.rs | 6 ++++++ > server/src/api/pve/mod.rs | 21 +++++++++++++++++++++ > server/src/remote_updates.rs | 22 +++++++++++++++++++++- > 3 files changed, 48 insertions(+), 1 deletion(-) > > diff --git a/lib/pdm-client/src/lib.rs b/lib/pdm-client/src/lib.rs > index 11bedb64..f8d6062a 100644 > --- a/lib/pdm-client/src/lib.rs > +++ b/lib/pdm-client/src/lib.rs > @@ -3,6 +3,7 @@ > use std::collections::HashMap; > use std::time::Duration; > > +use pdm_api_types::remote_updates::RemoteUpdateSummary; > use pdm_api_types::remotes::{RemoteType, TlsProbeOutcome}; > use pdm_api_types::resource::{PveResource, RemoteResources, ResourceType, TopEntities}; > use pdm_api_types::rrddata::{ > @@ -554,6 +555,11 @@ impl PdmClient { > Ok(self.0.get(&query).await?.expect_json()?.data) > } > > + pub async fn pve_cluster_updates(&self, remote: &str) -> Result { > + let url = format!("/api2/extjs/pve/remotes/{remote}/updates"); Hmm, wondering if we should expose the top-level /version API endpoint [0] for such things, as that uses only "compiled"-in constants when returning, so would be a bit cheaper. I mean, this can be switched at any time, so it probably just doesn't really matter for now.. OTOH, your approach actually might be superior, as one gets the node-specific info for the whole remote, not just the version for the node one connects too. [0]: https://pve.proxmox.com/pve-docs/api-viewer/index.html#/version _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel