[pve-devel] [PATCH installer v5 29/36] common: skip target_hd when deserializing InstallConfig
Aaron Lauterer
a.lauterer at proxmox.com
Tue Apr 16 17:33:18 CEST 2024
as only the 'path' property is serialized -> deserialization is
problematic. The information would be present in the 'run-env-info-json',
but for now there is no need for it in any code that deserializes the
low-level config. Therefore we are currently skipping it on
deserialization
If we need it in the future, we need to think about how to handle the
deserialization.
Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
---
proxmox-installer-common/src/setup.rs | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/proxmox-installer-common/src/setup.rs b/proxmox-installer-common/src/setup.rs
index c580477..2454cbd 100644
--- a/proxmox-installer-common/src/setup.rs
+++ b/proxmox-installer-common/src/setup.rs
@@ -423,7 +423,12 @@ pub struct InstallConfig {
#[serde(
serialize_with = "serialize_disk_opt",
- skip_serializing_if = "Option::is_none"
+ skip_serializing_if = "Option::is_none",
+ // only the 'path' property is serialized -> deserialization is problematic
+ // The information would be present in the 'run-env-info-json', but for now there is no
+ // need for it in any code that deserializes the low-level config. Therefore we are
+ // currently skipping it on deserialization
+ skip_deserializing
)]
pub target_hd: Option<Disk>,
#[serde(skip_serializing_if = "BTreeMap::is_empty")]
--
2.39.2
More information about the pve-devel
mailing list