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.

Tested-by: Christoph Heiss <c.he...@proxmox.com>
Reviewed-by: Christoph Heiss <c.he...@proxmox.com>
Signed-off-by: Aaron Lauterer <a.laute...@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



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to