mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 19:32:56 +09:00
Revert "B #1960: Follow the value of the persistent attribute in the Image template. "
This reverts commit ea760d3fe5.
This commit is contained in:
1 parent
ea760d3fe5
commit
7e8a5ed63e
1 file changed
+11
-12
+11
-12
@@ -891,19 +891,18 @@ bool Image::test_set_persistent(Template * image_template, int uid, int gid,
|
||||
}
|
||||
|
||||
int rc = nd.get_configuration_attribute(uid, gid, conf_name, per_oned);
|
||||
|
||||
bool has_persistent = image_template->get("PERSISTENT", persistent);
|
||||
|
||||
if ( rc == 0 && !has_persistent )
|
||||
|
||||
if ( rc != 0 || per_oned.empty() ) //No DEFAULT_* defined or empty value
|
||||
{
|
||||
if ( one_util::toupper(per_oned) == "YES" )
|
||||
{
|
||||
persistent = true;
|
||||
}
|
||||
else if ( one_util::toupper(per_oned) == "NO" )
|
||||
{
|
||||
persistent = false;
|
||||
}
|
||||
image_template->get("PERSISTENT", persistent);
|
||||
}
|
||||
else if ( rc == 0 && one_util::toupper(per_oned) == "YES" )
|
||||
{
|
||||
persistent = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
persistent = false;
|
||||
}
|
||||
|
||||
image_template->replace("PERSISTENT", persistent);
|
||||
|
||||
Reference in new issue
Block a user