mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 20:02:38 +09:00
Feature #4597: Allow to create more VR VMs, and terminate existing ones
(cherry picked from commit 94070576d8)
This commit is contained in:
1 parent
8433a1f727
commit
ffdb41bc3e
21 files changed
+413
-70
No files matched your search
@@ -535,26 +535,13 @@ void VirtualMachineAction::request_execute(xmlrpc_c::paramList const& paramList,
|
||||
|
||||
if (vm->is_vrouter() && !VirtualRouter::is_action_supported(action))
|
||||
{
|
||||
bool failure = true;
|
||||
att.resp_msg = "Action \"" + action_st + "\" is not supported for "
|
||||
"virtual router VMs";
|
||||
|
||||
// Terminate operation is allowed for orphan virtual router VMs.
|
||||
if ( action == History::TERMINATE_ACTION ||
|
||||
action == History::TERMINATE_HARD_ACTION )
|
||||
{
|
||||
VirtualRouterPool* vrpool = Nebula::instance().get_vrouterpool();
|
||||
failure = (vrpool->get(vm->get_vrouter_id(), false) != 0);
|
||||
}
|
||||
failure_response(ACTION, att);
|
||||
|
||||
if (failure)
|
||||
{
|
||||
att.resp_msg = "Action \"" + action_st + "\" is not supported for "
|
||||
"virtual router VMs";
|
||||
|
||||
failure_response(ACTION, att);
|
||||
|
||||
vm->unlock();
|
||||
return;
|
||||
}
|
||||
vm->unlock();
|
||||
return;
|
||||
}
|
||||
|
||||
vm->unlock();
|
||||
|
||||
Reference in new issue
Block a user