mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Do not modify one.conf
This commit is contained in:
parent
2d985fb581
commit
7b5b065364
@ -658,9 +658,10 @@ void Image::disk_attribute(VirtualMachineDisk * disk,
|
||||
|
||||
for (it = inherit_attrs.begin(); it != inherit_attrs.end(); it++)
|
||||
{
|
||||
string current_val = disk->vector_value(*it);
|
||||
get_template_attribute(*it, inherit_val);
|
||||
|
||||
if (!inherit_val.empty())
|
||||
if (current_val.empty() && !inherit_val.empty())
|
||||
{
|
||||
disk->replace(*it, inherit_val);
|
||||
}
|
||||
|
@ -1266,9 +1266,10 @@ void AddressRange::set_vnet(VectorAttribute *nic, const vector<string> &inherit)
|
||||
|
||||
for (it = inherit.begin(); it != inherit.end(); it++)
|
||||
{
|
||||
string current_val = nic->vector_value(*it);
|
||||
string inherit_val = attr->vector_value(*it);
|
||||
|
||||
if (!inherit_val.empty())
|
||||
if (current_val.empty() && !inherit_val.empty())
|
||||
{
|
||||
nic->replace((*it).c_str(), inherit_val);
|
||||
}
|
||||
|
@ -850,16 +850,6 @@ int VirtualNetwork::nic_attribute(
|
||||
nic->replace("BRIDGE_TYPE", bridge_type);
|
||||
}
|
||||
|
||||
for (it = inherit_attrs.begin(); it != inherit_attrs.end(); it++)
|
||||
{
|
||||
PoolObjectSQL::get_template_attribute(*it, inherit_val);
|
||||
|
||||
if (!inherit_val.empty())
|
||||
{
|
||||
nic->replace(*it, inherit_val);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Get the lease from the Virtual Network
|
||||
//--------------------------------------------------------------------------
|
||||
@ -899,6 +889,17 @@ int VirtualNetwork::nic_attribute(
|
||||
inherit_attrs);
|
||||
}
|
||||
|
||||
for (it = inherit_attrs.begin(); it != inherit_attrs.end(); it++)
|
||||
{
|
||||
string current_val = nic->vector_value(*it);
|
||||
PoolObjectSQL::get_template_attribute(*it, inherit_val);
|
||||
|
||||
if (current_val.empty() && !inherit_val.empty())
|
||||
{
|
||||
nic->replace(*it, inherit_val);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Copy the security group IDs
|
||||
//--------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user