use of com.cloud.api.response.SystemVmResponse in project CloudStack-archive by CloudStack-extras.
the class StopSystemVmCmd method execute.
@Override
public void execute() throws ResourceUnavailableException, ConcurrentOperationException {
UserContext.current().setEventDetails("Vm Id: " + getId());
VirtualMachine result = _mgr.stopSystemVM(this);
if (result != null) {
SystemVmResponse response = _responseGenerator.createSystemVmResponse(result);
response.setResponseName(getCommandName());
this.setResponseObject(response);
} else {
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Fail to stop system vm");
}
}
Aggregations