From: Stefan Hanreich <s.hanreich@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH proxmox-ve-rs v2 2/2] firewall: alias: document difference between Alias and AliasName
Date: Mon, 25 Nov 2024 18:04:49 +0100 [thread overview]
Message-ID: <20241125170449.238880-2-s.hanreich@proxmox.com> (raw)
In-Reply-To: <20241125170449.238880-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 | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/proxmox-ve-config/src/firewall/types/alias.rs b/proxmox-ve-config/src/firewall/types/alias.rs
index 553931e..7d56720 100644
--- a/proxmox-ve-config/src/firewall/types/alias.rs
+++ b/proxmox-ve-config/src/firewall/types/alias.rs
@@ -35,6 +35,8 @@ impl Display for AliasScope {
}
}
+/// Represents the name of an alias in a firewall rule in the RULES section of the firewall
+/// configuration.
#[derive(Debug, Clone, DeserializeFromStr, SerializeDisplay)]
#[cfg_attr(test, derive(Eq, PartialEq))]
pub struct AliasName {
@@ -86,6 +88,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
next prev parent reply other threads:[~2024-11-25 17:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-25 17:04 [pve-devel] [PATCH proxmox-ve-rs v2 1/2] fix #5927: firewall: alias: lowercase names of aliases Stefan Hanreich
2024-11-25 17:04 ` Stefan Hanreich [this message]
2024-11-25 21:06 ` [pve-devel] applied-series: " Thomas Lamprecht
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=20241125170449.238880-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 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.