1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Bug #3145: Pick the right instance type when multiple PUBLIC_CLOUDS sections are defined

This commit is contained in:
Tino Vazquez 2014-09-04 16:47:13 +02:00
parent 784401484b
commit c01a220d11

View File

@ -187,8 +187,7 @@ class SLDriver
:max_count => 1})
if !opts[:startCpus] or !opts[:maxMemory]
xml = REXML::Document.new xml_text
instance_type = xml.root.get_elements("//INSTANCE_TYPE")[0].text
instance_type = value_from_xml(sl_info,"INSTANCE_TYPE")
cpu, mem = instance_type_capacity(instance_type)
opts[:startCpus] = cpu / 100
opts[:maxMemory] = mem / 1024