Search in sources :

Example 1 with GetActiveSnapshotsForVolume

use of com.emc.sa.service.vipr.block.tasks.GetActiveSnapshotsForVolume in project coprhd-controller by CoprHD.

the class AddVolumesToConsistencyGroupService method getSnapshots.

/**
 * Get snapshots for a given volume id
 *
 * @param volumeId the volume id to use
 * @return list of snapshot ids
 */
public List<URI> getSnapshots(URI volumeId) {
    List<URI> blockSnapshots = Lists.newArrayList();
    List<BlockSnapshotRestRep> blockSnapshotRestReps = execute(new GetActiveSnapshotsForVolume(volumeId));
    for (BlockSnapshotRestRep blockSnapshotId : blockSnapshotRestReps) {
        blockSnapshots.add(blockSnapshotId.getId());
    }
    return blockSnapshots;
}
Also used : BlockSnapshotRestRep(com.emc.storageos.model.block.BlockSnapshotRestRep) GetActiveSnapshotsForVolume(com.emc.sa.service.vipr.block.tasks.GetActiveSnapshotsForVolume) URI(java.net.URI)

Aggregations

GetActiveSnapshotsForVolume (com.emc.sa.service.vipr.block.tasks.GetActiveSnapshotsForVolume)1 BlockSnapshotRestRep (com.emc.storageos.model.block.BlockSnapshotRestRep)1 URI (java.net.URI)1