From: Hannes Laimer <h.laimer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-firewall] api: rules: add descriptions to fields in rule return type
Date: Thu, 23 Oct 2025 16:15:46 +0200 [thread overview]
Message-ID: <20251023141546.105302-1-h.laimer@proxmox.com> (raw)
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 <h.laimer@proxmox.com>
---
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
reply other threads:[~2025-10-23 14:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20251023141546.105302-1-h.laimer@proxmox.com \
--to=h.laimer@proxmox.com \
--cc=pve-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox