use of com.emc.sa.service.vipr.block.tasks.GetBlockSnapshot in project coprhd-controller by CoprHD.
the class BlockStorageUtils method getReplicationGroupSnapshots.
public static Table<URI, String, BlockSnapshotRestRep> getReplicationGroupSnapshots(List<NamedRelatedResourceRep> volumeUris) {
Table<URI, String, BlockSnapshotRestRep> storageRgToVolumes = HashBasedTable.create();
for (NamedRelatedResourceRep volumeUri : volumeUris) {
BlockSnapshotRestRep snapshot = execute(new GetBlockSnapshot(volumeUri.getId()));
VolumeRestRep volume = execute(new GetBlockVolume(snapshot.getParent().getId()));
String rgName = volume.getReplicationGroupInstance();
URI storage = volume.getStorageController();
if (!storageRgToVolumes.contains(storage, rgName)) {
storageRgToVolumes.put(storage, rgName, snapshot);
}
}
return storageRgToVolumes;
}
Aggregations