mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Feature #1797: Add action name to the error message
This commit is contained in:
parent
e73117f220
commit
de813d909c
@ -307,6 +307,8 @@ void VirtualMachineAction::request_execute(xmlrpc_c::paramList const& paramList,
|
||||
Nebula& nd = Nebula::instance();
|
||||
DispatchManager * dm = nd.get_dm();
|
||||
|
||||
ostringstream oss;
|
||||
|
||||
AuthRequest::Operation op = auth_op;
|
||||
|
||||
if (action == "resched" || action == "unresched")
|
||||
@ -391,13 +393,18 @@ void VirtualMachineAction::request_execute(xmlrpc_c::paramList const& paramList,
|
||||
att);
|
||||
break;
|
||||
case -2:
|
||||
failure_response(ACTION,
|
||||
request_error("Wrong state to perform action",""),
|
||||
att);
|
||||
oss << "Wrong state to perform action \"" << action << "\"";
|
||||
|
||||
failure_response(ACTION,
|
||||
request_error(oss.str(),""),
|
||||
att);
|
||||
break;
|
||||
case -3:
|
||||
oss << "Virtual machine action \"" << action
|
||||
<< "\" is not supported";
|
||||
|
||||
failure_response(ACTION,
|
||||
request_error("Virtual machine action not supported",""),
|
||||
request_error(oss.str(),""),
|
||||
att);
|
||||
break;
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user