From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH installer 2/2] auto, post-hook: explicitly ref FqdnConfigContainer when `match`ing
Date: Mon, 17 Aug 2026 14:54:24 +0200 [thread overview]
Message-ID: <20260817125907.878237-3-c.heiss@proxmox.com> (raw)
In-Reply-To: <20260817125907.878237-1-c.heiss@proxmox.com>
Adaps both crates/binaries to the schema change after commit
4d7f57a12 ("installer-types: replace illegal oneOf schema")
in `proxmox`, which changed the `fqdn` field.
FqdnConfigContainer now implements AsRef<FqdnConfig>, so switch to that.
No functional changes.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
Depends on the previous patch and needs an appropriate bump of the
proxmox-installer-types crate dependency.
proxmox-auto-installer/src/utils.rs | 2 +-
proxmox-post-hook/src/main.rs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/proxmox-auto-installer/src/utils.rs b/proxmox-auto-installer/src/utils.rs
index 710af21..7205ae3 100644
--- a/proxmox-auto-installer/src/utils.rs
+++ b/proxmox-auto-installer/src/utils.rs
@@ -40,7 +40,7 @@ fn get_network_settings(
.interface_name_pinning()
.map(|answer| answer.into());
- let mut network_options = match &answer.global.fqdn {
+ let mut network_options = match answer.global.fqdn.as_ref() {
// If the user set a static FQDN in the answer file, override it
FqdnConfig::Simple(name) => {
let mut opts = NetworkOptions::defaults_from(
diff --git a/proxmox-post-hook/src/main.rs b/proxmox-post-hook/src/main.rs
index ec9ab74..749fd0e 100644
--- a/proxmox-post-hook/src/main.rs
+++ b/proxmox-post-hook/src/main.rs
@@ -98,7 +98,7 @@ mod detail {
.and_then(|r| Ok(String::from_utf8(r.stdout)?))
};
- let fqdn = match &answer.global.fqdn {
+ let fqdn = match answer.global.fqdn.as_ref() {
FqdnConfig::Simple(name) => name.to_string(),
FqdnConfig::FromDhcp(FqdnFromDhcpConfig {
source: FqdnSourceMode::FromDhcp,
--
2.55.0
prev parent reply other threads:[~2026-08-17 12:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-17 12:54 [PATCH proxmox/installer 0/2] fix auto-installer/post-hook after schema change Christoph Heiss
2026-08-17 12:54 ` [PATCH proxmox 1/2] installer-types: FqdnConfigContainer: implement AsRef into FqdnConfig Christoph Heiss
2026-08-17 12:54 ` Christoph Heiss [this message]
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=20260817125907.878237-3-c.heiss@proxmox.com \
--to=c.heiss@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