From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 1C7D81FF2A0 for ; Mon, 15 Jul 2024 10:04:50 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 31F28357D5; Mon, 15 Jul 2024 10:05:08 +0200 (CEST) From: Christoph Heiss To: pve-devel@lists.proxmox.com Date: Mon, 15 Jul 2024 09:56:01 +0200 Message-ID: <20240715075700.283532-2-c.heiss@proxmox.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240715075700.283532-1-c.heiss@proxmox.com> References: <20240715075700.283532-1-c.heiss@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.017 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH installer v2 1/6] common: move `PasswordOptions` type to tui crate X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" It's only used internally there anyway, so make it slightly less confusing. Signed-off-by: Christoph Heiss --- Changes v1 -> v2: * no changes proxmox-installer-common/src/options.rs | 15 --------------- proxmox-tui-installer/src/main.rs | 4 ++-- proxmox-tui-installer/src/options.rs | 18 ++++++++++++++++-- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/proxmox-installer-common/src/options.rs b/proxmox-installer-common/src/options.rs index e77914b..9375ded 100644 --- a/proxmox-installer-common/src/options.rs +++ b/proxmox-installer-common/src/options.rs @@ -327,21 +327,6 @@ impl TimezoneOptions { } } -#[derive(Clone, Debug)] -pub struct PasswordOptions { - pub email: String, - pub root_password: String, -} - -impl Default for PasswordOptions { - fn default() -> Self { - Self { - email: "mail@example.invalid".to_string(), - root_password: String::new(), - } - } -} - #[derive(Clone, Debug, PartialEq)] pub struct NetworkOptions { pub ifname: String, diff --git a/proxmox-tui-installer/src/main.rs b/proxmox-tui-installer/src/main.rs index 4fb7afd..dd600c6 100644 --- a/proxmox-tui-installer/src/main.rs +++ b/proxmox-tui-installer/src/main.rs @@ -16,10 +16,10 @@ use cursive::{ use regex::Regex; mod options; -use options::InstallerOptions; +use options::{InstallerOptions, PasswordOptions}; use proxmox_installer_common::{ - options::{BootdiskOptions, NetworkOptions, PasswordOptions, TimezoneOptions}, + options::{BootdiskOptions, NetworkOptions, TimezoneOptions}, setup::{installer_setup, LocaleInfo, ProxmoxProduct, RuntimeInfo, SetupInfo}, utils::Fqdn, }; diff --git a/proxmox-tui-installer/src/options.rs b/proxmox-tui-installer/src/options.rs index 73fbf2a..6335762 100644 --- a/proxmox-tui-installer/src/options.rs +++ b/proxmox-tui-installer/src/options.rs @@ -2,8 +2,7 @@ use crate::SummaryOption; use proxmox_installer_common::{ options::{ - BootdiskOptions, BtrfsRaidLevel, FsType, NetworkOptions, PasswordOptions, TimezoneOptions, - ZfsRaidLevel, + BootdiskOptions, BtrfsRaidLevel, FsType, NetworkOptions, TimezoneOptions, ZfsRaidLevel, }, setup::LocaleInfo, }; @@ -25,6 +24,21 @@ pub const FS_TYPES: &[FsType] = { ] }; +#[derive(Clone, Debug)] +pub struct PasswordOptions { + pub email: String, + pub root_password: String, +} + +impl Default for PasswordOptions { + fn default() -> Self { + Self { + email: "mail@example.invalid".to_string(), + root_password: String::new(), + } + } +} + #[derive(Clone, Debug)] pub struct InstallerOptions { pub bootdisk: BootdiskOptions, -- 2.45.1 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel