Search in sources :

Example 1 with VerifyVolumeDependencies

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

the class BlockStorageUtils method verifyVolumeDependencies.

/**
 * Verify that list of volume doesn't contain any dependencies (snapshot, full copies, continuous copy)
 *
 * @param volumeIds of the volumes to validate dependencies
 */
public static void verifyVolumeDependencies(List<URI> volumeIds, URI projectId) {
    List<URI> allBlockResources = Lists.newArrayList(volumeIds);
    for (URI volumeId : volumeIds) {
        BlockObjectRestRep volume = getVolume(volumeId);
        allBlockResources.addAll(getSrdfTargetVolumes(volume));
        allBlockResources.addAll(getRpTargetVolumes(volume));
    }
    execute(new VerifyVolumeDependencies(allBlockResources, projectId));
}
Also used : URI(java.net.URI) BlockObjectRestRep(com.emc.storageos.model.block.BlockObjectRestRep) VerifyVolumeDependencies(com.emc.sa.service.vipr.block.tasks.VerifyVolumeDependencies)

Aggregations

VerifyVolumeDependencies (com.emc.sa.service.vipr.block.tasks.VerifyVolumeDependencies)1 BlockObjectRestRep (com.emc.storageos.model.block.BlockObjectRestRep)1 URI (java.net.URI)1