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 DB0621FF09C for ; Mon, 02 Nov 2026 13:46:13 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id A2BD121753; Mon, 02 Nov 2026 13:46:09 +0100 (CET) From: Christoph Heiss To: pve-devel@lists.proxmox.com Subject: [PATCH proxmox v4 02/30] installer-types: use `MacAddress` type where applicable Date: Mon, 2 Nov 2026 13:45:08 +0100 Message-ID: <20261102124539.1008075-3-c.heiss@proxmox.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261102124539.1008075-1-c.heiss@proxmox.com> References: <20261102124539.1008075-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: 1793623555145 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.231 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: MIB2X4BAAG6SLTJXFPKGYW4G5YB56BEU X-Message-ID-Hash: MIB2X4BAAG6SLTJXFPKGYW4G5YB56BEU 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 v3 -> v4: * no changes Changes v2 -> v3: * no changes Changes v1 -> v2: * no changes proxmox-installer-types/src/answer.rs | 4 ++-- proxmox-installer-types/src/post_hook.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/proxmox-installer-types/src/answer.rs b/proxmox-installer-types/src/answer.rs index 9375989d..e1b5e04d 100644 --- a/proxmox-installer-types/src/answer.rs +++ b/proxmox-installer-types/src/answer.rs @@ -14,7 +14,7 @@ use std::{ str::FromStr, }; -use proxmox_network_types::{fqdn::Fqdn, ip_address::Cidr}; +use proxmox_network_types::{MacAddress, fqdn::Fqdn, ip_address::Cidr}; #[cfg(feature = "api-types")] use proxmox_schema::{ @@ -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