Search in sources :

Example 1 with CreateMultipleBlockVolumes

use of com.emc.sa.service.vipr.block.tasks.CreateMultipleBlockVolumes 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

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