all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-firewall] api: rules: add descriptions to fields in rule return type
@ 2025-10-23 14:15 Hannes Laimer
  2025-11-11 11:19 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages 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] 2+ messages in thread

* [pve-devel] applied: [PATCH pve-firewall] api: rules: add descriptions to fields in rule return type
  2025-10-23 14:15 [pve-devel] [PATCH pve-firewall] api: rules: add descriptions to fields in rule return type Hannes Laimer
@ 2025-11-11 11:19 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-11-11 11:19 UTC (permalink / raw)
  To: pve-devel, Hannes Laimer

On Thu, 23 Oct 2025 16:15:46 +0200, Hannes Laimer wrote:
> 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.
> 
> 

Applied, thanks!

[1/1] api: rules: add descriptions to fields in rule return type
      commit: 689ba7a63caaaa09022eb4e9bc90b3a2e1c219ca


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-11-11 11:18 UTC | newest]

Thread overview: 2+ messages (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
2025-11-11 11:19 ` [pve-devel] applied: " Thomas Lamprecht

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