public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH proxmox-ve-rs 2/2] firewall: alias: document difference between Alias and AliasName
Date: Mon, 25 Nov 2024 17:12:49 +0100	[thread overview]
Message-ID: <20241125161249.211552-2-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20241125161249.211552-1-s.hanreich@proxmox.com>

Alias and AliasName represent two different parts inside a firewall
configuration. Document the respective structs better to make the
differences between them clearer.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
---
 proxmox-ve-config/src/firewall/types/alias.rs | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/proxmox-ve-config/src/firewall/types/alias.rs b/proxmox-ve-config/src/firewall/types/alias.rs
index 08e4d77..a7c6c33 100644
--- a/proxmox-ve-config/src/firewall/types/alias.rs
+++ b/proxmox-ve-config/src/firewall/types/alias.rs
@@ -35,6 +35,7 @@ impl Display for AliasScope {
     }
 }
 
+/// Represents the name of an Alias in a firewall rule the firewall configuration.
 #[derive(Debug, Clone, DeserializeFromStr, SerializeDisplay)]
 #[cfg_attr(test, derive(Eq, PartialEq))]
 pub struct AliasName {
@@ -86,6 +87,11 @@ impl AliasName {
     }
 }
 
+/// Represents an Alias stored in the ALIASES section of the firewall configuration.
+///
+/// Since they contain no scope in the firewall configuration itself, this struct also does not
+/// contain a scope. The scope has to be inferred from the Context where this Alias is stored, if
+/// that is necessary.
 #[derive(Debug)]
 #[cfg_attr(test, derive(Eq, PartialEq))]
 pub struct Alias {
-- 
2.39.5


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


  reply	other threads:[~2024-11-25 16:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-25 16:12 [pve-devel] [PATCH proxmox-ve-rs 1/2] firewall: alias: lowercase names of aliases Stefan Hanreich
2024-11-25 16:12 ` Stefan Hanreich [this message]
2024-11-25 16:26 ` Stefan Hanreich
2024-11-25 17:05   ` Stefan Hanreich

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=20241125161249.211552-2-s.hanreich@proxmox.com \
    --to=s.hanreich@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal