use of com.cloud.netapp.NetappVolumeVO in project cloudstack by apache.
the class VolumeDaoImpl method listVolumesAscending.
@Override
public List<NetappVolumeVO> listVolumesAscending(String poolName) {
Filter searchFilter = new Filter(NetappVolumeVO.class, "id", Boolean.TRUE, Long.valueOf(0), Long.valueOf(10000));
SearchCriteria<NetappVolumeVO> sc = NetappListVolumeSearch.create();
sc.setParameters("poolName", poolName);
return listBy(sc, searchFilter);
}
use of com.cloud.netapp.NetappVolumeVO in project cloudstack by apache.
the class ListVolumesOnFilerCmd method execute.
@Override
public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException {
try {
List<NetappVolumeVO> volumes = netappMgr.listVolumesOnFiler(poolName);
ListResponse<ListVolumesOnFilerCmdResponse> listResponse = new ListResponse<ListVolumesOnFilerCmdResponse>();
List<ListVolumesOnFilerCmdResponse> responses = new ArrayList<ListVolumesOnFilerCmdResponse>();
for (NetappVolumeVO volume : volumes) {
ListVolumesOnFilerCmdResponse response = new ListVolumesOnFilerCmdResponse();
response.setId(volume.getId());
response.setIpAddress(volume.getIpAddress());
response.setPoolName(volume.getPoolName());
response.setAggrName(volume.getAggregateName());
response.setVolumeName(volume.getVolumeName());
response.setSnapshotPolicy(volume.getSnapshotPolicy());
response.setSnapshotReservation(volume.getSnapshotReservation());
response.setVolumeSize(volume.getVolumeSize());
response.setObjectName("volume");
responses.add(response);
}
listResponse.setResponses(responses);
listResponse.setResponseName(getCommandName());
this.setResponseObject(listResponse);
} catch (InvalidParameterValueException e) {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.toString());
}
}
Aggregations