@Override public void execute() { BlockStorageUtils.removeBlockResources(uris(volumeIds), deletionType); // form is always passing hostId, never clusterId - need to figure out which it is. String hostOrClusterId = BlockStorageUtils.getHostOrClusterId(hostId); if (hostOrClusterId != null) { ExecutionUtils.addAffectedResource(hostOrClusterId.toString()); } }
@Override public void precheck() { sourceVolume = BlockStorageUtils.getVolume(volumeId); targetVolume = BlockStorageUtils.getVolume(failoverTarget); type = BlockStorageUtils.getFailoverType(targetVolume); if (type == null) { ExecutionUtils.fail( "failTask.FailoverBlockVolumeService", args(stringId(targetVolume)), args()); } logInfo("fail.over.block.volume.service", type.toUpperCase(), targetVolume.getName()); }
@Override public void execute() throws Exception { if (!createBlockVolumeHelpers.isEmpty()) { List<URI> volumeIds = Lists.newArrayList(); volumeIds.addAll(BlockStorageUtils.createMultipleVolumes(createBlockVolumeHelpers)); } }
@Override public void init() throws Exception { super.init(); // for each pair of volume name and size, create a createBlockVolumeHelper for (VolumeTable volumes : volumeTable) { CreateBlockVolumeHelper createBlockVolumeHelper = new CreateBlockVolumeHelper(); BindingUtils.bind( createBlockVolumeHelper, BlockStorageUtils.createParam(volumes, volumeParams)); createBlockVolumeHelpers.add(createBlockVolumeHelper); } }
@Override public void precheck() { BlockStorageUtils.checkVolumeLimit(getClient(), volumeParams.project); }
@Override public void execute() { BlockStorageUtils.removeContinuousCopiesForVolume(uri(volumeId), uris(copyIds)); }
@Override public void precheck() { BlockStorageUtils.getBlockResource(uri(volumeId)); }