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

feature #662: VMTemplate now has TEMPLATE_ID to ease VMTemplate.instantiate method

This commit is contained in:
Ruben S. Montero 2011-06-01 12:36:31 +02:00
parent e61cd923c5
commit d25384092b

View File

@ -77,7 +77,11 @@ int VMTemplate::insert(SqlDB *db, string& error_str)
// Check default attributes
// ---------------------------------------------------------------------
// ------------ NAME --------------------
// ------------ NAME & TEMPLATE_ID --------------------
oss << oid;
replace_template_attribute("TEMPLATE_ID",oss.str());
get_template_attribute("NAME", name);
if ( name.empty() == true )
@ -87,7 +91,9 @@ int VMTemplate::insert(SqlDB *db, string& error_str)
name = oss.str();
}
// ------------ PUBLIC --------------------
get_template_attribute("PUBLIC", public_attr);
obj_template->erase("PUBLIC");