mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-15 18:50:09 +03:00
b #5697: Remove SAVE_AS_HOT attribute
(cherry picked from commit f100729f099b1a08d9968a3f25af9ce0ff4ae9ae)
This commit is contained in:
parent
05fa7e07ca
commit
46b6837def
@ -440,6 +440,11 @@ public:
|
||||
return static_cast<ImageTemplate*>(obj_template.get())->is_saving();
|
||||
}
|
||||
|
||||
void clear_saving()
|
||||
{
|
||||
static_cast<ImageTemplate*>(obj_template.get())->clear_saving();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set/Unset an image as persistent
|
||||
* @param persistent true to make an image persistent
|
||||
|
@ -45,6 +45,11 @@ public:
|
||||
replace("SAVE_AS_HOT", "YES");
|
||||
}
|
||||
|
||||
void clear_saving()
|
||||
{
|
||||
erase("SAVE_AS_HOT");
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Restricted attributes interface implementation
|
||||
// -------------------------------------------------------------------------
|
||||
|
@ -1753,6 +1753,8 @@ void LifeCycleManager::trigger_saveas_success(int vid)
|
||||
|
||||
if ( auto image = ipool->get(image_id) )
|
||||
{
|
||||
image->clear_saving();
|
||||
|
||||
image->set_state_unlock();
|
||||
|
||||
ipool->update(image.get());
|
||||
@ -1803,6 +1805,8 @@ void LifeCycleManager::trigger_saveas_failure(int vid)
|
||||
|
||||
if ( auto image = ipool->get(image_id) )
|
||||
{
|
||||
image->clear_saving();
|
||||
|
||||
image->set_state(Image::ERROR);
|
||||
|
||||
ipool->update(image.get());
|
||||
|
@ -268,7 +268,7 @@ int Template::replace(const string& name, const bool& value)
|
||||
|
||||
int Template::erase(const string& name)
|
||||
{
|
||||
int j = 0;
|
||||
int j = 0;
|
||||
|
||||
auto index = attributes.equal_range(name);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user