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 C94A51FF15E for ; Mon, 10 Nov 2025 15:55:57 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A23AF19913; Mon, 10 Nov 2025 15:56:42 +0100 (CET) Message-ID: <40fd93f6-43fe-4243-9e1b-5ac1189fea51@proxmox.com> Date: Mon, 10 Nov 2025 15:56:08 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox Datacenter Manager development discussion , Lukas Wagner References: <20251105163546.450094-1-h.laimer@proxmox.com> <20251105163546.450094-11-h.laimer@proxmox.com> Content-Language: en-US From: Hannes Laimer In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1762786546098 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.046 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pdm-devel] [PATCH proxmox-datacenter-manager v2 2/4] api: firewall: add option, rules and status endpoints 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: pdm-devel-bounces@lists.proxmox.com Sender: "pdm-devel" On 11/7/25 13:27, Lukas Wagner wrote: >> + for (vmid, name, kind) in guests { >> + let options_response = match kind { >> + GuestKind::Lxc => pve.lxc_firewall_options(&node, vmid), >> + GuestKind::Qemu => pve.qemu_firewall_options(&node, vmid), >> + }; >> + let rules_response = match kind { >> + GuestKind::Lxc => pve.list_lxc_firewall_rules(&node, vmid), >> + GuestKind::Qemu => pve.list_qemu_firewall_rules(&node, vmid), >> + }; >> + >> + let enabled = options_response >> + .await >> + .map(|opts| opts.enable.unwrap_or_default()); >> + let rules = rules_response.await.map(|rules| { >> + let all = rules.len(); >> + let active = rules.iter().filter(|r| r.enable == Some(1)).count(); >> + RuleStat { all, active } >> + }); > > I think technically you could use join to await both futures at the same > time, which essentially will perform both requests at the same time. > > But since I guess then this would need to be considered in the > connection limits for the ParallelFetcher somehow Thought the same thing. Since we have a ParallelFetcher I wanted to have it do all of the parallel fetching :P _______________________________________________ pdm-devel mailing list pdm-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel