mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-21 04:12:37 +09:00
B #1777: When a RA is removed it is added to the tmp template to
preserve it after merges/replaces
(cherry picked from commit 7d56427061)
This commit is contained in:
1 parent
b6f1ea1804
commit
da326485e6
1 file changed
+13
-2
@@ -730,10 +730,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 )
|
||||
@@ -742,6 +749,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user