# File lib/deltacloud/drivers/opennebula/opennebula_driver.rb, line 126 def create_instance(credentials, image_id, opts=nil) occi_client = new_client(credentials) hwp_id = opts[:hwp_id] || 'small' if not opts[:name] opts[:name] = "#{Time.now.to_i.to_s}#{rand(9)}" end instancexml = ERB.new(OCCI_VM).result(binding) instancefile = "|echo '#{instancexml}'" xmlvm = occi_client.post_vms(instancefile) convert_instance(xmlvm.to_s(), credentials) end