[pve-devel] [PATCH installer v2 1/6] common: move `PasswordOptions` type to tui crate
Christoph Heiss
c.heiss at proxmox.com
Mon Jul 15 09:56:01 CEST 2024
It's only used internally there anyway, so make it slightly less
confusing.
Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
---
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 at 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 at example.invalid".to_string(),
+ root_password: String::new(),
+ }
+ }
+}
+
#[derive(Clone, Debug)]
pub struct InstallerOptions {
pub bootdisk: BootdiskOptions,
--
2.45.1
More information about the pve-devel
mailing list