From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id F04641FF0B4 for ; Tue, 08 Sep 2026 12:17:14 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 674C9215A0; Tue, 08 Sep 2026 12:17:05 +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, 8 Sep 2026 12:16:15 +0200 Message-ID: <20260908101647.1057780-2-c.heiss@proxmox.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260908101647.1057780-1-c.heiss@proxmox.com> References: <20260908101647.1057780-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: 1788862614795 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.427 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: N7RUHHS5KYHG7EFJNQQMPO2VZQ44GRU3 X-Message-ID-Hash: N7RUHHS5KYHG7EFJNQQMPO2VZQ44GRU3 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 --- 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 e2e9b8e4..e608b4cb 100644 --- a/proxmox-installer-types/src/answer.rs +++ b/proxmox-installer-types/src/answer.rs @@ -435,7 +435,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