use of com.emc.storageos.volumecontroller.impl.block.taskcompleter.SRDFMirrorCreateCompleter in project coprhd-controller by CoprHD.
the class SRDFDeviceController method createSrdfCgPairsStep.
public boolean createSrdfCgPairsStep(URI systemURI, List<URI> sourceURIs, List<URI> targetURIs, URI vpoolChangeUri, String opId) {
log.info("START creating SRDF Pairs in CGs");
SRDFMirrorCreateCompleter completer = null;
try {
WorkflowStepCompleter.stepExecuting(opId);
StorageSystem system = getStorageSystem(systemURI);
List<URI> combined = new ArrayList<>(sourceURIs);
combined.addAll(targetURIs);
completer = new SRDFMirrorCreateCompleter(combined, vpoolChangeUri, opId);
InvokeTestFailure.internalOnlyInvokeTestFailure(InvokeTestFailure.ARTIFICIAL_FAILURE_078);
getRemoteMirrorDevice().doCreateCgPairs(system, sourceURIs, targetURIs, completer);
InvokeTestFailure.internalOnlyInvokeTestFailure(InvokeTestFailure.ARTIFICIAL_FAILURE_079);
// No code after this point.
} catch (Exception e) {
completeAsError(completer, DeviceControllerException.errors.jobFailed(e), opId);
return false;
}
return true;
}
use of com.emc.storageos.volumecontroller.impl.block.taskcompleter.SRDFMirrorCreateCompleter in project coprhd-controller by CoprHD.
the class SRDFDeviceController method createListReplicas.
public boolean createListReplicas(URI systemURI, List<URI> sourceURIs, List<URI> targetURIs, URI vpoolChangeUri, boolean addWaitForCopyState, String opId) {
log.info("START Creating list of replicas");
TaskCompleter completer = null;
try {
WorkflowStepCompleter.stepExecuting(opId);
StorageSystem system = getStorageSystem(systemURI);
List<URI> combined = new ArrayList<>();
combined.addAll(sourceURIs);
combined.addAll(targetURIs);
completer = new SRDFMirrorCreateCompleter(combined, vpoolChangeUri, opId);
log.info("Sources: {}", Joiner.on(',').join(sourceURIs));
log.info("Targets: {}", Joiner.on(',').join(targetURIs));
log.info("OpId: {}", opId);
getRemoteMirrorDevice().doCreateListReplicas(system, sourceURIs, targetURIs, addWaitForCopyState, completer);
} catch (Exception e) {
return completeAsError(completer, DeviceControllerException.errors.jobFailed(e), opId);
}
return true;
}
use of com.emc.storageos.volumecontroller.impl.block.taskcompleter.SRDFMirrorCreateCompleter in project coprhd-controller by CoprHD.
the class SRDFDeviceController method createSRDFVolumePairStep.
public boolean createSRDFVolumePairStep(final URI systemURI, final URI sourceURI, final URI targetURI, final URI vpoolChangeUri, final String opId) {
log.info("START Add srdf volume pair");
TaskCompleter completer = new SRDFMirrorCreateCompleter(sourceURI, targetURI, vpoolChangeUri, opId);
try {
log.info("Source: {}", sourceURI);
log.info("Target: {}", targetURI);
log.info("OpId: {}", opId);
WorkflowStepCompleter.stepExecuting(opId);
StorageSystem system = getStorageSystem(systemURI);
InvokeTestFailure.internalOnlyInvokeTestFailure(InvokeTestFailure.ARTIFICIAL_FAILURE_074);
getRemoteMirrorDevice().doCreateLink(system, sourceURI, targetURI, completer);
InvokeTestFailure.internalOnlyInvokeTestFailure(InvokeTestFailure.ARTIFICIAL_FAILURE_075);
} catch (Exception e) {
return completeAsError(completer, DeviceControllerException.errors.jobFailed(e), opId);
}
return true;
}
Aggregations