use of com.cloud.server.api.response.netapp.CreateVolumeOnFilerCmdResponse in project cloudstack by apache.
the class CreateVolumeOnFilerCmd method execute.
@Override
public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException {
//param checks
if (snapshotReservation != null && (snapshotReservation < 0 || snapshotReservation > 100))
throw new InvalidParameterValueException("Invalid snapshot reservation");
StringBuilder s = new StringBuilder(getVolSize().toString());
s.append("g");
try {
netappMgr.createVolumeOnFiler(ipAddress, aggrName, poolName, volName, s.toString(), snapshotPolicy, snapshotReservation, userName, password);
CreateVolumeOnFilerCmdResponse response = new CreateVolumeOnFilerCmdResponse();
response.setResponseName(getCommandName());
this.setResponseObject(response);
} catch (ServerException e) {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.toString());
} catch (InvalidParameterValueException e) {
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, e.toString());
} catch (UnknownHostException e) {
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, e.toString());
}
}
Aggregations