Search in sources :

Example 1 with DeactivateVolumes

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

the class BlockStorageUtils method deactivateVolumes.

public static void deactivateVolumes(List<URI> volumeIds, VolumeDeleteTypeEnum type) {
    if (CollectionUtils.isNotEmpty(volumeIds)) {
        Tasks<VolumeRestRep> tasks = execute(new DeactivateVolumes(volumeIds, type));
        addAffectedResources(tasks);
    }
}
Also used : DeactivateVolumes(com.emc.sa.service.vipr.block.tasks.DeactivateVolumes) VolumeRestRep(com.emc.storageos.model.block.VolumeRestRep)

Example 2 with DeactivateVolumes

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

the class BlockStorageUtils method createMultipleVolumes.

public static List<URI> createMultipleVolumes(List<? extends CreateBlockVolumeHelper> helpers) {
    Tasks<VolumeRestRep> tasks = execute(new CreateMultipleBlockVolumes(helpers));
    List<URI> volumeIds = Lists.newArrayList();
    for (Task<VolumeRestRep> task : tasks.getTasks()) {
        URI volumeId = task.getResourceId();
        addAffectedResource(volumeId);
        volumeIds.add(volumeId);
    }
    addRollback(new DeactivateVolumes(volumeIds, VolumeDeleteTypeEnum.FULL));
    return volumeIds;
}
Also used : DeactivateVolumes(com.emc.sa.service.vipr.block.tasks.DeactivateVolumes) CreateMultipleBlockVolumes(com.emc.sa.service.vipr.block.tasks.CreateMultipleBlockVolumes) VolumeRestRep(com.emc.storageos.model.block.VolumeRestRep) URI(java.net.URI)

Aggregations

DeactivateVolumes (com.emc.sa.service.vipr.block.tasks.DeactivateVolumes)2 VolumeRestRep (com.emc.storageos.model.block.VolumeRestRep)2 CreateMultipleBlockVolumes (com.emc.sa.service.vipr.block.tasks.CreateMultipleBlockVolumes)1 URI (java.net.URI)1