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