mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-19 06:50:07 +03:00
feature #4217: Fix error after merge from 4215. Change messages to
"virtual router"
This commit is contained in:
parent
49e87d9b44
commit
313eb34a7b
@ -1090,6 +1090,7 @@ int Nebula::get_conf_attribute(
|
||||
|
||||
for (it = values.begin(); it != values.end(); it ++)
|
||||
{
|
||||
value = *it;
|
||||
template_name = (*it)->vector_value("NAME");
|
||||
name_upper = name;
|
||||
|
||||
|
@ -51,7 +51,7 @@ void VMTemplateInstantiate::request_execute(xmlrpc_c::paramList const& paramList
|
||||
|
||||
if (is_vrouter)
|
||||
{
|
||||
att.resp_msg = "Templates with VROUTER=YES cannot be instantiated as stand-alone VMs";
|
||||
att.resp_msg = "Virtual router templates cannot be instantiated as stand-alone VMs";
|
||||
failure_response(ACTION, att);
|
||||
return;
|
||||
}
|
||||
|
@ -548,37 +548,19 @@ void VirtualMachineAction::request_execute(xmlrpc_c::paramList const& paramList,
|
||||
{
|
||||
bool failure = true;
|
||||
|
||||
// Just in case, we check if the VRouter does not exist for a delete
|
||||
// operation.
|
||||
// Delete operation is allowed for orphan virtual router VMs.
|
||||
if (action == History::DELETE_ACTION ||
|
||||
action == History::SHUTDOWN_ACTION ||
|
||||
action == History::SHUTDOWN_HARD_ACTION)
|
||||
{
|
||||
int vrid = vm->get_vrouter_id();
|
||||
|
||||
vm->unlock();
|
||||
|
||||
VirtualRouterPool* vrpool = Nebula::instance().get_vrouterpool();
|
||||
VirtualRouter * vrouter = vrpool->get(vrid, true);
|
||||
|
||||
if (vrouter == 0)
|
||||
{
|
||||
failure = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
vrouter->unlock();
|
||||
}
|
||||
|
||||
if ((vm = get_vm(id, att)) == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
VirtualRouterPool* vrpool = Nebula::instance().get_vrouterpool();
|
||||
failure = (vrpool->get(vm->get_vrouter_id(), false) != 0);
|
||||
}
|
||||
|
||||
if (failure)
|
||||
{
|
||||
att.resp_msg = "Action \""+action_st+"\" is not supported for Virtual Router VMs";
|
||||
att.resp_msg = "Action \""+action_st+"\" is not supported for "
|
||||
"virtual router VMs";
|
||||
failure_response(ACTION, att);
|
||||
|
||||
vm->unlock();
|
||||
@ -1049,7 +1031,7 @@ void VirtualMachineMigrate::request_execute(xmlrpc_c::paramList const& paramList
|
||||
|
||||
if (vm->is_vrouter() && !vm->is_vrouter_action_supported(action))
|
||||
{
|
||||
att.resp_msg = "Migration is not supported for Virtual Router VMs";
|
||||
att.resp_msg = "Migration is not supported for virtual router VMs";
|
||||
failure_response(ACTION, att);
|
||||
|
||||
vm->unlock();
|
||||
@ -1600,7 +1582,7 @@ void VirtualMachineAttach::request_execute(xmlrpc_c::paramList const& paramList,
|
||||
|
||||
if (vm->is_vrouter() && !vm->is_vrouter_action_supported(History::DISK_ATTACH_ACTION))
|
||||
{
|
||||
att.resp_msg = "Action is not supported for Virtual Router VMs";
|
||||
att.resp_msg = "Action is not supported for virtual router VMs";
|
||||
failure_response(ACTION, att);
|
||||
|
||||
vm->unlock();
|
||||
@ -1683,7 +1665,7 @@ void VirtualMachineDetach::request_execute(xmlrpc_c::paramList const& paramList,
|
||||
|
||||
if (vm->is_vrouter() && !vm->is_vrouter_action_supported(History::NIC_DETACH_ACTION))
|
||||
{
|
||||
att.resp_msg = "Action is not supported for Virtual Router VMs";
|
||||
att.resp_msg = "Action is not supported for virtual router VMs";
|
||||
failure_response(ACTION, att);
|
||||
|
||||
vm->unlock();
|
||||
@ -2135,7 +2117,7 @@ void VirtualMachineAttachNic::request_execute(
|
||||
|
||||
if (vm->is_vrouter() && !vm->is_vrouter_action_supported(History::NIC_ATTACH_ACTION))
|
||||
{
|
||||
att.resp_msg = "Action is not supported for Virtual Router VMs";
|
||||
att.resp_msg = "Action is not supported for virtual router VMs";
|
||||
failure_response(Request::ACTION, att);
|
||||
|
||||
vm->unlock();
|
||||
@ -2272,7 +2254,7 @@ void VirtualMachineDetachNic::request_execute(
|
||||
|
||||
if (vm->is_vrouter() && !vm->is_vrouter_action_supported(History::NIC_DETACH_ACTION))
|
||||
{
|
||||
att.resp_msg = "Action is not supported for Virtual Router VMs";
|
||||
att.resp_msg = "Action is not supported for virtual router VMs";
|
||||
failure_response(Request::ACTION, att);
|
||||
|
||||
vm->unlock();
|
||||
|
@ -88,7 +88,7 @@ void VirtualRouterInstantiate::request_execute(
|
||||
|
||||
if (has_vmids)
|
||||
{
|
||||
att.resp_msg = "Virtual Router already has VMs. Cannot instantiate new ones";
|
||||
att.resp_msg = "Virtual router already has VMs. Cannot instantiate new ones";
|
||||
failure_response(ACTION, att);
|
||||
return;
|
||||
}
|
||||
@ -109,7 +109,7 @@ void VirtualRouterInstantiate::request_execute(
|
||||
|
||||
if (!is_vrouter)
|
||||
{
|
||||
att.resp_msg = "Only Templates with VROUTER=YES are allowed";
|
||||
att.resp_msg = "Only virtual router templates are allowed";
|
||||
failure_response(ACTION, att);
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user