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);
}
}
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;
}
Aggregations