use of com.emc.storageos.volumecontroller.impl.block.taskcompleter.VplexMirrorDeactivateCompleter in project coprhd-controller by CoprHD.
the class VPlexDeviceController method deactivateMirror.
@Override
public void deactivateMirror(URI vplexURI, URI mirrorURI, List<VolumeDescriptor> volumeDescriptors, String taskId) throws InternalException {
VplexMirrorDeactivateCompleter completer = new VplexMirrorDeactivateCompleter(mirrorURI, taskId);
try {
// Generate the Workflow.
Workflow workflow = _workflowService.getNewWorkflow(this, DEACTIVATE_MIRROR_WF_NAME, true, taskId);
// the wait for key returned by previous call
String waitFor = null;
// Add steps for detaching and deleting mirror
waitFor = addStepsForDetachAndDeleteMirror(workflow, waitFor, vplexURI, mirrorURI, taskId);
// Next, call the BlockDeviceController to add its methods.
waitFor = _blockDeviceController.addStepsForDeleteVolumes(workflow, waitFor, volumeDescriptors, taskId);
String successMessage = "Deactivate mirror successful for: " + mirrorURI;
workflow.executePlan(completer, successMessage);
} catch (Exception ex) {
_log.error("Deactivate mirror failed for mirror " + mirrorURI, ex);
ServiceError serviceError = VPlexApiException.errors.deactivateMirrorFailed(ex);
failStep(completer, taskId, serviceError);
}
}
Aggregations