Search in sources :

Example 1 with GetBlockSnapshotSession

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;
}
Also used : BlockSnapshotSessionRestRep(com.emc.storageos.model.block.BlockSnapshotSessionRestRep) NamedRelatedResourceRep(com.emc.storageos.model.NamedRelatedResourceRep) URI(java.net.URI) GetBlockSnapshotSession(com.emc.sa.service.vipr.application.tasks.GetBlockSnapshotSession)

Aggregations

GetBlockSnapshotSession (com.emc.sa.service.vipr.application.tasks.GetBlockSnapshotSession)1 NamedRelatedResourceRep (com.emc.storageos.model.NamedRelatedResourceRep)1 BlockSnapshotSessionRestRep (com.emc.storageos.model.block.BlockSnapshotSessionRestRep)1 URI (java.net.URI)1