Search in sources :

Example 1 with SimulatorManager

use of com.cloud.agent.manager.SimulatorManager in project CloudStack-archive by CloudStack-extras.

the class ConfigureSimulator method execute.

@Override
public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException {
    ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name);
    SimulatorManager _simMgr = locator.getManager(SimulatorManager.class);
    boolean result = _simMgr.configureSimulator(zoneId, podId, clusterId, hostId, command, values);
    if (!result) {
        throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to configure simulator");
    }
    SuccessResponse response = new SuccessResponse(getCommandName());
    this.setResponseObject(response);
}
Also used : ComponentLocator(com.cloud.utils.component.ComponentLocator) SuccessResponse(com.cloud.api.response.SuccessResponse) ServerApiException(com.cloud.api.ServerApiException) SimulatorManager(com.cloud.agent.manager.SimulatorManager)

Aggregations

SimulatorManager (com.cloud.agent.manager.SimulatorManager)1 ServerApiException (com.cloud.api.ServerApiException)1 SuccessResponse (com.cloud.api.response.SuccessResponse)1 ComponentLocator (com.cloud.utils.component.ComponentLocator)1