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 E7FD41FF17E for ; Thu, 30 Oct 2025 16:49:02 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C76CA26E0B; Thu, 30 Oct 2025 16:49:01 +0100 (CET) From: Stefan Hanreich To: pve-devel@lists.proxmox.com Date: Thu, 30 Oct 2025 16:48:17 +0100 Message-ID: <20251030154851.540408-11-s.hanreich@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251030154851.540408-1-s.hanreich@proxmox.com> References: <20251030154851.540408-1-s.hanreich@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.185 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 KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods RDNS_NONE 0.793 Delivered to internal network by a host with no rDNS SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record Subject: [pve-devel] [PATCH proxmox-perl-rs 02/10] pve-rs: firewall: add missing documentation comments X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Add missing documentation comments on the SdnFirewallConfig struct and the config function. Signed-off-by: Stefan Hanreich --- pve-rs/src/bindings/firewall/sdn.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pve-rs/src/bindings/firewall/sdn.rs b/pve-rs/src/bindings/firewall/sdn.rs index 6a773cc..530e805 100644 --- a/pve-rs/src/bindings/firewall/sdn.rs +++ b/pve-rs/src/bindings/firewall/sdn.rs @@ -62,6 +62,11 @@ pub mod pve_rs_firewall_sdn { } } + /// A struct holding the SDN part of a firewall configuration. + /// + /// The main use is for returning the auto-generated SDN ipsets to Perl, so they can be + /// included in the API response as well as used in pve-firewall for generating the respective + /// ipsets. #[derive(Clone, Debug, Default, Serialize)] pub struct SdnFirewallConfig { ipset: HashMap>, @@ -94,6 +99,11 @@ pub mod pve_rs_firewall_sdn { const SDN_IPAM: &str = "/etc/pve/sdn/pve-ipam-state.json"; const SDN_IPAM_LEGACY: &str = "/etc/pve/priv/ipam.db"; // TODO: remove with PVE 9+ + /// Generate the SDN firewall configuration. + /// + /// vnet_filter and vm_filter can be passed by perl in order to filter the returned IPsets to + /// only include the specified vnets / vms. This is necessary for ACL, since it is currently + /// not implemented for Proxmox VE in Rust. #[export] pub fn config( vnet_filter: Option>, -- 2.47.3 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel