use of com.emc.storageos.driver.driversimulator.operations.RestoreFromCloneSimulatorOperation in project coprhd-controller by CoprHD.
the class StorageDriverSimulator method restoreFromClone.
@Override
public DriverTask restoreFromClone(List<VolumeClone> clones) {
RestoreFromCloneSimulatorOperation restoreCloneSimulatorOperation = new RestoreFromCloneSimulatorOperation(clones);
if (simulatorConfig.getSimulateAsynchronousResponses()) {
DriverTask driverTask = restoreCloneSimulatorOperation.getDriverTask();
taskOperationMap.put(driverTask.getTaskId(), restoreCloneSimulatorOperation);
return driverTask;
} else if (simulatorConfig.getSimulateFailures()) {
String failMsg = restoreCloneSimulatorOperation.getFailureMessage();
return restoreCloneSimulatorOperation.doFailure(failMsg);
} else {
restoreCloneSimulatorOperation.updateCloneInfo(clones);
String successMsg = restoreCloneSimulatorOperation.getSuccessMessage(clones);
return restoreCloneSimulatorOperation.doSuccess(successMsg);
}
}
Aggregations