use of com.emc.storageos.driver.driversimulator.operations.CreateGroupCloneSimulatorOperation in project coprhd-controller by CoprHD.
the class StorageDriverSimulator method createConsistencyGroupClone.
@Override
public DriverTask createConsistencyGroupClone(VolumeConsistencyGroup consistencyGroup, List<VolumeClone> clones, List<CapabilityInstance> capabilities) {
CreateGroupCloneSimulatorOperation createCloneSimulatorOperation = new CreateGroupCloneSimulatorOperation(consistencyGroup, 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.updateGroupCloneInfo(consistencyGroup, clones);
String successMsg = createCloneSimulatorOperation.getSuccessMessage(clones);
return createCloneSimulatorOperation.doSuccess(successMsg);
}
}
Aggregations