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