Search in sources :

Example 1 with DeactivateContinuousCopy

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

the class BlockStorageUtils method removeContinuousCopy.

private static void removeContinuousCopy(URI volumeId, URI continuousCopyId, VolumeDeleteTypeEnum type) {
    if (VolumeDeleteTypeEnum.VIPR_ONLY != type) {
        BlockObjectRestRep obj = getVolume(volumeId);
        if (obj instanceof VolumeRestRep) {
            VolumeRestRep volume = (VolumeRestRep) obj;
            if (!StringUtils.equalsIgnoreCase(volume.getSystemType(), DiscoveredDataObject.Type.vplex.name())) {
                execute(new PauseContinuousCopy(volumeId, continuousCopyId, COPY_NATIVE));
            }
        }
    }
    Tasks<VolumeRestRep> tasks = execute(new DeactivateContinuousCopy(volumeId, continuousCopyId, COPY_NATIVE, type));
    addAffectedResources(tasks);
}
Also used : DeactivateContinuousCopy(com.emc.sa.service.vipr.block.tasks.DeactivateContinuousCopy) PauseContinuousCopy(com.emc.sa.service.vipr.block.tasks.PauseContinuousCopy) VolumeRestRep(com.emc.storageos.model.block.VolumeRestRep) BlockObjectRestRep(com.emc.storageos.model.block.BlockObjectRestRep)

Aggregations

DeactivateContinuousCopy (com.emc.sa.service.vipr.block.tasks.DeactivateContinuousCopy)1 PauseContinuousCopy (com.emc.sa.service.vipr.block.tasks.PauseContinuousCopy)1 BlockObjectRestRep (com.emc.storageos.model.block.BlockObjectRestRep)1 VolumeRestRep (com.emc.storageos.model.block.VolumeRestRep)1