These will be expected on the ISO itself and define the behavior of the automated installation.
Signed-off-by: Aaron Lauterer <a.laute...@proxmox.com> --- proxmox-auto-installer/src/utils.rs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/proxmox-auto-installer/src/utils.rs b/proxmox-auto-installer/src/utils.rs index ff90ae8..957e880 100644 --- a/proxmox-auto-installer/src/utils.rs +++ b/proxmox-auto-installer/src/utils.rs @@ -1,4 +1,5 @@ use anyhow::{bail, Result}; +use clap::ValueEnum; use glob::Pattern; use log::info; use std::{ @@ -14,7 +15,7 @@ use proxmox_installer_common::{ options::{FsType, NetworkOptions, ZfsChecksumOption, ZfsCompressOption}, setup::{InstallConfig, InstallZfsOption, LocaleInfo, RuntimeInfo, SetupInfo}, }; -use serde::Deserialize; +use serde::{Deserialize, Serialize}; fn find_with_glob(pattern: &str, value: &str) -> Result<bool> { let p = Pattern::new(pattern)?; @@ -72,6 +73,23 @@ pub fn get_single_udev_index( Ok(dev_index.unwrap()) } +#[derive(Deserialize, Serialize, Debug, Clone, ValueEnum, PartialEq)] +#[serde(rename_all = "lowercase", deny_unknown_fields)] +pub enum AutoInstModes { + Auto, + Included, + Http, + Partition, +} + +#[derive(Deserialize, Serialize, Debug)] +#[serde(rename_all = "lowercase", deny_unknown_fields)] +pub struct AutoInstSettings { + pub mode: AutoInstModes, + pub http_url: Option<String>, + pub ssl_fingerprint: Option<String>, +} + #[derive(Deserialize, Debug)] struct IpLinksUdevInfo { ifname: String, -- 2.39.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel