Search in sources :

Example 1 with GetBlockSnapshotSessionList

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

the class BlockStorageUtils method getSingleSnapshotSessionPerSubGroupAndStorageSystem.

public static List<URI> getSingleSnapshotSessionPerSubGroupAndStorageSystem(URI applicationId, String copySet, List<String> subGroups) {
    List<URI> snapshotSessionIds = Lists.newArrayList();
    Table<URI, String, BlockSnapshotSessionRestRep> results = getReplicationGroupSnapshotSessions(execute(new GetBlockSnapshotSessionList(applicationId, copySet)).getSnapSessionRelatedResourceList());
    for (Cell<URI, String, BlockSnapshotSessionRestRep> cell : results.cellSet()) {
        String stripped = BlockStorageUtils.stripRPTargetFromReplicationGroup(cell.getColumnKey());
        if (subGroups.contains(stripped)) {
            snapshotSessionIds.add(cell.getValue().getId());
        }
    }
    return snapshotSessionIds;
}
Also used : BlockSnapshotSessionRestRep(com.emc.storageos.model.block.BlockSnapshotSessionRestRep) GetBlockSnapshotSessionList(com.emc.sa.service.vipr.application.tasks.GetBlockSnapshotSessionList) URI(java.net.URI)

Aggregations

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