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

feature #2259: Change error message when the instance type does not exist

This commit is contained in:
Daniel Molina 2013-10-30 17:56:21 +01:00
parent cac4c2fb38
commit 9928b9b7b4

View File

@ -136,15 +136,15 @@ module Instance
template_id = template_pool["VMTEMPLATE/TEMPLATE[EC2_INSTANCE_TYPE=\'#{params['InstanceType']}\']/../ID"]
if template_id.nil?
rc = OpenNebula::Error.new("InvalidInstanceID.NotFound #{params['InstanceType']}")
rc.ec2_code = "InvalidInstanceID.NotFound"
rc = OpenNebula::Error.new("InvalidInstanceAttributeValue.NotFound #{params['InstanceType']}")
rc.ec2_code = "InvalidInstanceAttributeValue.NotFound"
return rc
end
template = Template.new(Template.build_xml(template_id), @client)
rc = template.info
if OpenNebula.is_error?(rc)
rc.ec2_code = "InvalidInstanceID.NotFound"
rc.ec2_code = "InvalidInstanceAttributeValue.NotFound"
return rc
end