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

Bug #1363: Make VCPU optional again

This commit is contained in:
Carlos Martín 2012-07-19 12:09:04 +02:00
parent 65ec7517cc
commit fc08d847f2

View File

@ -257,6 +257,10 @@ int VirtualMachine::insert(SqlDB * db, string& error_str)
goto error_cpu;
}
// VCPU is optional, first check if the attribute exists, then check it is
// an integer
get_template_attribute("VCPU", value);
if ( value.empty() == false )
{
if ( get_template_attribute("VCPU", ivalue) == false || ivalue <= 0 )