# File lib/fog/libvirt/models/compute/volume.rb, line 32 def initialize(attributes={} ) self.xml ||= nil unless attributes[:xml] self.key = nil self.format_type ||= "raw" unless attributes[:format_type] extension = self.format_type=="raw" ? "img" : self.format_type self.name ||= "fog-#{SecureRandom.random_number*10E14.to_i.round}.#{extension}" unless attributes[:name] self.capacity ||= "10G" unless attributes[:capacity] self.allocation ||= "1G" unless attributes[:allocation] super #We need a connection to calculate the poolname #This is why we do this after super self.pool_name ||= default_pool_name unless attributes[:pool_name] end