Skip to content

Commit baeacbf

Browse files
committed
fix lost default volume_type after creating LVM volume
1 parent 73feb82 commit baeacbf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/fog/libvirt/models/compute/volume.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ def wipe
5353
service.volume_action key, :wipe
5454
end
5555

56+
def reload
57+
super
58+
59+
# Restore lost defaults
60+
self.format_type ||= defaults[:format_type]
61+
62+
self
63+
end
64+
5665
# Clones this volume to the name provided
5766
def clone(name)
5867
new_volume = self.dup

0 commit comments

Comments
 (0)