1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-27 13:57:23 +03:00

Revert "Feature #1326: VMs instantiated from a template are named template_name-<vmid>"

This reverts commit 8e80bfcf667c87673ccb7eb12fce8deae1b40150.
This commit is contained in:
Ruben S. Montero 2012-12-23 23:31:00 +01:00
parent 8a58932e05
commit fdb5f09e89
4 changed files with 2 additions and 18 deletions

View File

@ -140,7 +140,7 @@ public:
return name;
};
virtual void set_name(const string& _name)
void set_name(const string& _name)
{
name = _name;
};

View File

@ -59,12 +59,6 @@ public:
*(static_cast<VirtualMachineTemplate *>(obj_template)));
};
virtual void set_name(const string& _name)
{
name = _name;
replace_template_attribute("TEMPLATE_NAME", name);
};
private:
// -------------------------------------------------------------------------
// Friends

View File

@ -230,16 +230,8 @@ int VirtualMachine::insert(SqlDB * db, string& error_str)
if ( name.empty() == true )
{
string prefix;
get_template_attribute("TEMPLATE_NAME",prefix);
if ( prefix.empty() )
{
prefix = "one";
}
oss.str("");
oss << prefix << "-" << oid;
oss << "one-" << oid;
name = oss.str();
replace_template_attribute("NAME", name);

View File

@ -98,8 +98,6 @@ int VMTemplate::insert(SqlDB *db, string& error_str)
return -1;
}
replace_template_attribute("TEMPLATE_NAME", name);
// ------------------------------------------------------------------------
// Insert the Template
// ------------------------------------------------------------------------