Feature #1631: Fix merge

This commit is contained in:
Carlos Martín committed 2013-04-03 18:20:20 +02:00
1 parent 536f881c45
commit b483b8bb25
4 files changed
+19 -6

No files matched your search

+8
View File
@@ -56,6 +56,7 @@ public:
RESCHED_ACTION,
UNRESCHED_ACTION,
POWEROFF_ACTION,
POWEROFF_HARD_ACTION,
NONE_ACTION
};
@@ -122,6 +123,9 @@ public:
case POWEROFF_ACTION:
st = "poweroff";
break;
case POWEROFF_HARD_ACTION:
st = "poweroff-hard";
break;
case NONE_ACTION:
st = "none";
break;
@@ -208,6 +212,10 @@ public:
{
action = POWEROFF_ACTION;
}
else if (st == "poweroff-hard")
{
action = POWEROFF_HARD_ACTION;
}
else
{
action = NONE_ACTION;
+6 -4
View File
@@ -463,22 +463,24 @@ void LifeCycleManager::poweroff_action(int vid, bool hard)
vmpool->update(vm);
vm->set_history_action(History::POWEROFF_ACTION);
vmpool->update_history(vm);
vm->log("LCM",Log::INFO,"New VM state is SHUTDOWN_POWEROFF");
//----------------------------------------------------
if (hard)
{
vm->set_history_action(History::POWEROFF_HARD_ACTION);
vmm->trigger(VirtualMachineManager::CANCEL,vid);
}
else
{
vm->set_history_action(History::POWEROFF_ACTION);
vmm->trigger(VirtualMachineManager::SHUTDOWN,vid);
}
vmpool->update_history(vm);
}
else
{
+1 -1
View File
@@ -1010,7 +1010,7 @@ void LifeCycleManager::cancel_success_action(int vid)
vm->set_vm_info();
vm->set_reason(History::STOP_RESUME);
vm->set_reason(History::NONE);
vmpool->update_history(vm);
+4 -1
View File
@@ -391,7 +391,10 @@ void VirtualMachineAction::request_execute(xmlrpc_c::paramList const& paramList,
rc = dm->reset(id);
break;
case History::POWEROFF_ACTION:
rc = dm->poweroff(id);
rc = dm->poweroff(id, false);
break;
case History::POWEROFF_HARD_ACTION:
rc = dm->poweroff(id, true);
break;
case History::UNDEPLOY_ACTION:
rc = dm->undeploy(id, false);