* [pve-devel] [PATCH pve-firewall] api: rules: add descriptions to fields in rule return type
@ 2025-10-23 14:15 Hannes Laimer
0 siblings, 0 replies; only message in thread
From: Hannes Laimer @ 2025-10-23 14:15 UTC (permalink / raw)
To: 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 <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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-10-23 14:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-23 14:15 [pve-devel] [PATCH pve-firewall] api: rules: add descriptions to fields in rule return type Hannes Laimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox