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

B #1777: When a RA is removed it is added to the tmp template to

preserve it after merges/replaces
This commit is contained in:
Ruben S. Montero 2018-03-23 18:07:27 +01:00
parent 83d548e928
commit 7d56427061

View File

@ -742,10 +742,17 @@ bool Template::check_restricted(string& ra, const Template* base,
}
else
{
// +---------+--------+--------------------+
// | current | base | outcome |
// +---------+--------+--------------------+
// | YES | YES/NO | Error if different |
// | NO | YES | Add to current |
// | NO | NO | Nop |
// +---------+--------+--------------------+
string ra_b;
if ( get(rit->first, ra) )
{
string ra_b;
base->get(rit->first, ra_b);
if ( ra_b != ra )
@ -754,6 +761,10 @@ bool Template::check_restricted(string& ra, const Template* base,
return true;
}
}
else if ( base->get(rit->first, ra_b) )
{
add(rit->first, ra_b);
}
}
}