Search in sources :

Example 6 with ExportMaskRemoveVolumeCompleter

use of com.emc.storageos.volumecontroller.impl.block.taskcompleter.ExportMaskRemoveVolumeCompleter in project coprhd-controller by CoprHD.

the class HDSMaskingOrchestrator method generateWorkflowStepToToRemoveVolumesFromExportMask.

/**
 * Generates workflow step to remove volumes from ExportMask.
 *
 * @param workflow
 * @param previousStep
 * @param exportGroup
 * @param exportMask
 * @param completer
 * @return
 */
public String generateWorkflowStepToToRemoveVolumesFromExportMask(Workflow workflow, String previousStep, ExportGroup exportGroup, ExportMask exportMask, List<URI> volumesToRemove, ExportTaskCompleter completer) {
    URI exportGroupURI = exportGroup.getId();
    String stepId = workflow.createStepId();
    ExportTaskCompleter exportTaskCompleter;
    if (completer != null) {
        exportTaskCompleter = completer;
        exportTaskCompleter.setOpId(stepId);
    } else {
        exportTaskCompleter = new ExportMaskRemoveVolumeCompleter(exportGroupURI, exportMask.getId(), volumesToRemove, stepId);
    }
    Workflow.Method removeVolumesFromExportMaskExecuteMethod = new Workflow.Method("doExportGroupToCleanVolumesInExportMask", exportGroupURI, exportMask.getId(), volumesToRemove, exportTaskCompleter);
    stepId = workflow.createStep(EXPORT_MASK_CLEANUP_TASK, String.format("ExportMask to removeVolumes %s (%s)", exportMask.getMaskName(), exportMask.getId().toString()), previousStep, NullColumnValueGetter.getNullURI(), "storage-system", MaskingWorkflowEntryPoints.class, removeVolumesFromExportMaskExecuteMethod, null, stepId);
    return stepId;
}
Also used : ExportTaskCompleter(com.emc.storageos.volumecontroller.impl.block.taskcompleter.ExportTaskCompleter) Workflow(com.emc.storageos.workflow.Workflow) URI(java.net.URI) ExportMaskRemoveVolumeCompleter(com.emc.storageos.volumecontroller.impl.block.taskcompleter.ExportMaskRemoveVolumeCompleter) HDSExportMaskRemoveVolumeCompleter(com.emc.storageos.volumecontroller.impl.hds.prov.job.HDSExportMaskRemoveVolumeCompleter)

Aggregations

ExportMaskRemoveVolumeCompleter (com.emc.storageos.volumecontroller.impl.block.taskcompleter.ExportMaskRemoveVolumeCompleter)6 ExportTaskCompleter (com.emc.storageos.volumecontroller.impl.block.taskcompleter.ExportTaskCompleter)5 URI (java.net.URI)5 ExportOperationContext (com.emc.storageos.volumecontroller.impl.utils.ExportOperationContext)3 Workflow (com.emc.storageos.workflow.Workflow)3 ArrayList (java.util.ArrayList)3 ExportGroup (com.emc.storageos.db.client.model.ExportGroup)2 NamedURI (com.emc.storageos.db.client.model.NamedURI)2 DatabaseException (com.emc.storageos.db.exceptions.DatabaseException)2 DeviceControllerException (com.emc.storageos.exceptions.DeviceControllerException)2 ServiceError (com.emc.storageos.svcs.errorhandling.model.ServiceError)2 InternalException (com.emc.storageos.svcs.errorhandling.resources.InternalException)2 InternalServerErrorException (com.emc.storageos.svcs.errorhandling.resources.InternalServerErrorException)2 ControllerException (com.emc.storageos.volumecontroller.ControllerException)2 TaskCompleter (com.emc.storageos.volumecontroller.TaskCompleter)2 CloneTaskCompleter (com.emc.storageos.volumecontroller.impl.block.taskcompleter.CloneTaskCompleter)2 VolumeTaskCompleter (com.emc.storageos.volumecontroller.impl.block.taskcompleter.VolumeTaskCompleter)2 VplexMirrorTaskCompleter (com.emc.storageos.volumecontroller.impl.block.taskcompleter.VplexMirrorTaskCompleter)2 VPlexApiException (com.emc.storageos.vplex.api.VPlexApiException)2 CacheStatusTaskCompleter (com.emc.storageos.vplexcontroller.completers.CacheStatusTaskCompleter)2