From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 4B0C31FF396 for ; Thu, 23 May 2024 14:19:34 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 8A2791F1B1; Thu, 23 May 2024 14:19:47 +0200 (CEST) From: Christoph Heiss To: pve-devel@lists.proxmox.com Date: Thu, 23 May 2024 14:19:29 +0200 Message-ID: <20240523121938.1058898-2-c.heiss@proxmox.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240523121938.1058898-1-c.heiss@proxmox.com> References: <20240523121938.1058898-1-c.heiss@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.006 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [main.rs, options.rs] Subject: [pve-devel] [PATCH installer 1/7] 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 --- 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.44.0 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel