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:
parent
8a58932e05
commit
fdb5f09e89
@ -140,7 +140,7 @@ public:
|
||||
return name;
|
||||
};
|
||||
|
||||
virtual void set_name(const string& _name)
|
||||
void set_name(const string& _name)
|
||||
{
|
||||
name = _name;
|
||||
};
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -98,8 +98,6 @@ int VMTemplate::insert(SqlDB *db, string& error_str)
|
||||
return -1;
|
||||
}
|
||||
|
||||
replace_template_attribute("TEMPLATE_NAME", name);
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Insert the Template
|
||||
// ------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user