# File lib/fog/vsphere/models/compute/volume.rb, line 17 def initialize(attributes={} ) super defaults.merge(attributes) end
# File lib/fog/vsphere/models/compute/volume.rb, line 21 def size_gb attributes[:size_gb] ||= attributes[:size].to_i / DISK_SIZE_TO_GB if attributes[:size] end
# File lib/fog/vsphere/models/compute/volume.rb, line 25 def size_gb= s attributes[:size] = s.to_i * DISK_SIZE_TO_GB if s end
# File lib/fog/vsphere/models/compute/volume.rb, line 29 def to_s name end
# File lib/fog/vsphere/models/compute/volume.rb, line 35 def defaults { :thin=>true, :name=>"Hard disk", :mode=>"persistent" } end