Search in sources :

Example 1 with GetFullCopyList

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

the class BlockStorageUtils method getAllFullCopyVolumes.

public static List<URI> getAllFullCopyVolumes(URI applicationId, String copySet, List<String> subGroups) {
    List<URI> fullCopyIds = Lists.newArrayList();
    List<NamedRelatedResourceRep> fullCopies = execute(new GetFullCopyList(applicationId, copySet)).getVolumes();
    for (NamedRelatedResourceRep fullCopy : fullCopies) {
        fullCopyIds.add(fullCopy.getId());
    }
    return fullCopyIds;
}
Also used : GetFullCopyList(com.emc.sa.service.vipr.application.tasks.GetFullCopyList) NamedRelatedResourceRep(com.emc.storageos.model.NamedRelatedResourceRep) URI(java.net.URI)

Example 2 with GetFullCopyList

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

the class BlockStorageUtils method getSingleFullCopyPerSubGroupAndStorageSystem.

public static List<URI> getSingleFullCopyPerSubGroupAndStorageSystem(URI applicationId, String copySet, List<String> subGroups) {
    List<URI> fullCopyIds = Lists.newArrayList();
    Table<URI, String, VolumeRestRep> results = getReplicationGroupFullCopies(execute(new GetFullCopyList(applicationId, copySet)).getVolumes());
    for (Cell<URI, String, VolumeRestRep> cell : results.cellSet()) {
        if (subGroups.contains(cell.getColumnKey())) {
            fullCopyIds.add(cell.getValue().getId());
        }
    }
    return fullCopyIds;
}
Also used : GetFullCopyList(com.emc.sa.service.vipr.application.tasks.GetFullCopyList) VolumeRestRep(com.emc.storageos.model.block.VolumeRestRep) URI(java.net.URI)

Aggregations

GetFullCopyList (com.emc.sa.service.vipr.application.tasks.GetFullCopyList)2 URI (java.net.URI)2 NamedRelatedResourceRep (com.emc.storageos.model.NamedRelatedResourceRep)1 VolumeRestRep (com.emc.storageos.model.block.VolumeRestRep)1