From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 407D11FF0AA for ; Tue, 20 Oct 2026 13:24:24 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 92A5321680; Tue, 20 Oct 2026 13:24:11 +0200 (CEST) From: Christoph Heiss To: pve-devel@lists.proxmox.com Subject: [PATCH proxmox 01/15] installer-types: use `MacAddress` type where applicable Date: Tue, 20 Oct 2026 13:23:08 +0200 Message-ID: <20261020112327.641633-2-c.heiss@proxmox.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261020112327.641633-1-c.heiss@proxmox.com> References: <20261020112327.641633-1-c.heiss@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1792495418711 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.287 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: XH65UVMSLFBXIVQXEUGGB4BQJZKBBYGT X-Message-ID-Hash: XH65UVMSLFBXIVQXEUGGB4BQJZKBBYGT X-MailFrom: c.heiss@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: .. instead of plain strings, making the definitions more strongly typed. Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * no changes proxmox-installer-types/src/answer.rs | 2 +- proxmox-installer-types/src/post_hook.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/proxmox-installer-types/src/answer.rs b/proxmox-installer-types/src/answer.rs index 5d9b3953..ccecc2d5 100644 --- a/proxmox-installer-types/src/answer.rs +++ b/proxmox-installer-types/src/answer.rs @@ -436,7 +436,7 @@ pub struct NetworkInterfacePinningOptionsAnswer { pub enabled: bool, /// Maps MAC address to custom name #[serde(default, skip_serializing_if = "HashMap::is_empty")] - pub mapping: HashMap, + pub mapping: HashMap, } #[cfg_attr(feature = "api-types", api( diff --git a/proxmox-installer-types/src/post_hook.rs b/proxmox-installer-types/src/post_hook.rs index 77cbef48..2cbc0f52 100644 --- a/proxmox-installer-types/src/post_hook.rs +++ b/proxmox-installer-types/src/post_hook.rs @@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize}; -use proxmox_network_types::ip_address::Cidr; +use proxmox_network_types::{MacAddress, ip_address::Cidr}; #[cfg(feature = "api-types")] use proxmox_schema::api; @@ -90,7 +90,7 @@ pub struct NetworkInterfaceInfo { /// Name of the interface pub name: String, /// MAC address of the interface - pub mac: String, + pub mac: MacAddress, /// (Designated) IP address of the interface #[serde(skip_serializing_if = "Option::is_none")] pub address: Option, -- 2.55.0