Search in sources :

Example 1 with ApiVolumeSnapshotDetailsResponse

use of org.apache.cloudstack.api.response.solidfire.ApiVolumeSnapshotDetailsResponse in project cloudstack by apache.

the class SolidFireIntegrationTestUtil method getSnapshotDetails.

public List<ApiVolumeSnapshotDetailsResponse> getSnapshotDetails(String snapshotUuid) {
    SnapshotVO snapshot = snapshotDao.findByUuid(snapshotUuid);
    List<SnapshotDetailsVO> snapshotDetails = snapshotDetailsDao.listDetails(snapshot.getId());
    List<ApiVolumeSnapshotDetailsResponse> responses = new ArrayList<>();
    if (snapshotDetails != null) {
        for (SnapshotDetailsVO snapshotDetail : snapshotDetails) {
            ApiVolumeSnapshotDetailsResponse response = new ApiVolumeSnapshotDetailsResponse(snapshotDetail.getResourceId(), snapshotDetail.getName(), snapshotDetail.getValue());
            responses.add(response);
        }
    }
    return responses;
}
Also used : SnapshotVO(com.cloud.storage.SnapshotVO) ArrayList(java.util.ArrayList) ApiVolumeSnapshotDetailsResponse(org.apache.cloudstack.api.response.solidfire.ApiVolumeSnapshotDetailsResponse) SnapshotDetailsVO(com.cloud.storage.dao.SnapshotDetailsVO)

Aggregations

SnapshotVO (com.cloud.storage.SnapshotVO)1 SnapshotDetailsVO (com.cloud.storage.dao.SnapshotDetailsVO)1 ArrayList (java.util.ArrayList)1 ApiVolumeSnapshotDetailsResponse (org.apache.cloudstack.api.response.solidfire.ApiVolumeSnapshotDetailsResponse)1