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;
}
Aggregations