Search in sources :

Example 1 with CreateLunCmdResponse

use of com.cloud.server.api.response.netapp.CreateLunCmdResponse in project cloudstack by apache.

the class CreateLunCmd method execute.

@Override
public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException {
    try {
        CreateLunCmdResponse response = new CreateLunCmdResponse();
        String[] returnVals = null;
        returnVals = netappMgr.createLunOnFiler(getPoolName(), getLunSize());
        response.setPath(returnVals[0]);
        response.setIqn(returnVals[1]);
        response.setIpAddress(returnVals[2]);
        response.setObjectName("lun");
        response.setResponseName(getCommandName());
        this.setResponseObject(response);
    } catch (ServerException e) {
        throw new ServerApiException(ApiErrorCode.PARAM_ERROR, e.toString());
    } catch (InvalidParameterValueException e) {
        throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.toString());
    }
}
Also used : ServerException(java.rmi.ServerException) ServerApiException(org.apache.cloudstack.api.ServerApiException) InvalidParameterValueException(com.cloud.exception.InvalidParameterValueException) CreateLunCmdResponse(com.cloud.server.api.response.netapp.CreateLunCmdResponse)

Aggregations

InvalidParameterValueException (com.cloud.exception.InvalidParameterValueException)1 CreateLunCmdResponse (com.cloud.server.api.response.netapp.CreateLunCmdResponse)1 ServerException (java.rmi.ServerException)1 ServerApiException (org.apache.cloudstack.api.ServerApiException)1