all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Hannes Laimer <h.laimer@proxmox.com>
To: Proxmox Datacenter Manager development discussion
	<pdm-devel@lists.proxmox.com>,
	Lukas Wagner <l.wagner@proxmox.com>
Subject: Re: [pdm-devel] [PATCH proxmox-datacenter-manager v2 2/4] api: firewall: add option, rules and status endpoints
Date: Mon, 10 Nov 2025 15:56:08 +0100	[thread overview]
Message-ID: <40fd93f6-43fe-4243-9e1b-5ac1189fea51@proxmox.com> (raw)
In-Reply-To: <DE2GN6EKYC2S.RJ2Z48A4H3FH@proxmox.com>

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


  reply	other threads:[~2025-11-10 14:55 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-05 16:35 [pdm-devel] [PATCH proxmox{, -yew-comp, -datacenter-manager} v2 00/12] add basic integration of PVE firewall Hannes Laimer
2025-11-05 16:35 ` [pdm-devel] [PATCH proxmox v2 1/4] pve-api-types: update pve-api.json Hannes Laimer
2025-11-05 16:35 ` [pdm-devel] [PATCH proxmox v2 2/4] pve-api-types: add get/update firewall options endpoints Hannes Laimer
2025-11-05 16:35 ` [pdm-devel] [PATCH proxmox v2 3/4] pve-api-types: add list firewall rules endpoints Hannes Laimer
2025-11-05 16:35 ` [pdm-devel] [PATCH proxmox v2 4/4] pve-api-types: regenerate Hannes Laimer
2025-11-10 13:47   ` Michael Köppl
2025-11-10 14:04     ` Hannes Laimer
2025-11-10 15:25   ` Michael Köppl
2025-11-10 15:33     ` Hannes Laimer
2025-11-10 15:40       ` Hannes Laimer
2025-11-10 15:47       ` Michael Köppl
2025-11-05 16:35 ` [pdm-devel] [PATCH proxmox-yew-comp v2 1/4] form: add helpers for extractig data out of schemas Hannes Laimer
2025-11-05 16:35 ` [pdm-devel] [PATCH proxmox-yew-comp v2 2/4] firewall: add FirewallContext Hannes Laimer
2025-11-05 16:35 ` [pdm-devel] [PATCH proxmox-yew-comp v2 3/4] firewall: add options edit form Hannes Laimer
2025-11-07 12:26   ` Lukas Wagner
2025-11-10 12:36   ` Michael Köppl
2025-11-05 16:35 ` [pdm-devel] [PATCH proxmox-yew-comp v2 4/4] firewall: add rules table Hannes Laimer
2025-11-07 12:26   ` Lukas Wagner
2025-11-10 14:51     ` Hannes Laimer
2025-11-05 16:35 ` [pdm-devel] [PATCH proxmox-datacenter-manager v2 1/4] pdm-api-types: add firewall status types Hannes Laimer
2025-11-07 12:27   ` Lukas Wagner
2025-11-05 16:35 ` [pdm-devel] [PATCH proxmox-datacenter-manager v2 2/4] api: firewall: add option, rules and status endpoints Hannes Laimer
2025-11-06 16:58   ` Michael Köppl
2025-11-07  6:43     ` Hannes Laimer
2025-11-07 12:27   ` Lukas Wagner
2025-11-10 14:56     ` Hannes Laimer [this message]
2025-11-05 16:35 ` [pdm-devel] [PATCH proxmox-datacenter-manager v2 3/4] pdm-client: add api methods for firewall options, " Hannes Laimer
2025-11-05 16:35 ` [pdm-devel] [PATCH proxmox-datacenter-manager v2 4/4] ui: add firewall status tree Hannes Laimer
2025-11-07 12:27   ` Lukas Wagner
2025-11-10 15:29     ` Hannes Laimer
2025-11-10 17:26 ` [pdm-devel] superseded: [PATCH proxmox{, -yew-comp, -datacenter-manager} v2 00/12] add basic integration of PVE firewall Hannes Laimer

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=40fd93f6-43fe-4243-9e1b-5ac1189fea51@proxmox.com \
    --to=h.laimer@proxmox.com \
    --cc=l.wagner@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal