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 E99891FF165 for ; Thu, 23 Oct 2025 16:15:26 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id BFDF9BFF3; Thu, 23 Oct 2025 16:15:52 +0200 (CEST) From: Hannes Laimer To: pve-devel@lists.proxmox.com Date: Thu, 23 Oct 2025 16:15:46 +0200 Message-ID: <20251023141546.105302-1-h.laimer@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1761228940561 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.007 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 PROLO_LEO1 0.1 Meta Catches all Leo drug variations so far SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH pve-firewall] api: rules: add descriptions to fields in rule return type 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" This change would make also sense on its own, but adding this specifically because we need a description to be present for the rust code generation. Fixes: b8d021291 ("api: rules: add return type to list_rules endpoint") Signed-off-by: Hannes Laimer --- src/PVE/API2/Firewall/Rules.pm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/PVE/API2/Firewall/Rules.pm b/src/PVE/API2/Firewall/Rules.pm index baed539..785ad05 100644 --- a/src/PVE/API2/Firewall/Rules.pm +++ b/src/PVE/API2/Firewall/Rules.pm @@ -21,21 +21,26 @@ my $api_properties = { my $rule_return_properties = { action => { + description => "Rule action ('ACCEPT', 'DROP', 'REJECT') or security group name", type => 'string', }, comment => { + description => 'Descriptive comment', type => 'string', optional => 1, }, dest => { + description => 'Restrict packet destination address', type => 'string', optional => 1, }, dport => { + description => 'Restrict TCP/UDP destination port', type => 'string', optional => 1, }, enable => { + description => 'Flag to enable/disable a rule', type => 'integer', optional => 1, }, @@ -46,37 +51,50 @@ my $rule_return_properties = { }, ), 'icmp-type' => { + description => + "Specify icmp-type. Only valid if proto equals 'icmp' or 'icmpv6'/'ipv6-icmp'", type => 'string', optional => 1, }, iface => { + description => + 'Network interface name. You have to use network configuration key names for VMs and containers', type => 'string', optional => 1, }, ipversion => { + description => + 'IP version (4 or 6) - automatically determined from source/dest addresses', type => 'integer', optional => 1, }, macro => { + description => 'Use predefined standard macro', type => 'string', optional => 1, }, pos => { + description => 'Rule position in the ruleset', type => 'integer', }, proto => { + description => + "IP protocol. You can use protocol names ('tcp'/'udp') or simple numbers, as defined in '/etc/protocols'", type => 'string', optional => 1, }, source => { + description => 'Restrict packet source address', type => 'string', optional => 1, }, sport => { + description => 'Restrict TCP/UDP source port', type => 'string', optional => 1, }, type => { + description => 'Rule type', type => 'string', }, }; -- 2.47.3 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel