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

ec2 capacities FIX

This commit is contained in:
semedi 2017-07-20 10:53:34 +02:00 committed by Javi Fontan
parent 22d31c2e19
commit 62c8ed081e
2 changed files with 2 additions and 3 deletions

View File

@ -126,7 +126,7 @@ module Migrator
capacity = doc.create_element("CAPACITY")
host_info["capacity"].each { |k, v|
name = k[0..1] << k[3..k.length-1]
name = k.gsub(".", "_")
capacity.add_child(doc.create_element(name.upcase, v))
}

View File

@ -454,8 +454,7 @@ class EC2Driver
# Parse template instance type into
# Amazon ec2 format (M1SMALL => m1.small)
def parse_inst_type(type)
fixed_type = type[0..1]<< '.' << type[2..type.length+1]
return fixed_type.downcase
return type.downcase.gsub("_", ".")
end
# Get the info of all the EC2 instances. An EC2 instance must include