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