From baeacbf8db9d7b999fe6f570caa8c7a3cc5b79e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ga=C3=9F?= Date: Mon, 19 May 2025 14:48:22 +0200 Subject: [PATCH] fix lost default volume_type after creating LVM volume --- lib/fog/libvirt/models/compute/volume.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/fog/libvirt/models/compute/volume.rb b/lib/fog/libvirt/models/compute/volume.rb index 12b60ef..e7dea89 100644 --- a/lib/fog/libvirt/models/compute/volume.rb +++ b/lib/fog/libvirt/models/compute/volume.rb @@ -53,6 +53,15 @@ def wipe service.volume_action key, :wipe end + def reload + super + + # Restore lost defaults + self.format_type ||= defaults[:format_type] + + self + end + # Clones this volume to the name provided def clone(name) new_volume = self.dup