Search in sources :

Example 6 with BlockConsistencyGroupUpdateCompleter

use of com.emc.storageos.volumecontroller.impl.block.taskcompleter.BlockConsistencyGroupUpdateCompleter in project coprhd-controller by CoprHD.

the class ReplicaDeviceController method addSnapshotSessionsToConsistencyGroup.

public boolean addSnapshotSessionsToConsistencyGroup(URI storage, URI consistencyGroup, List<URI> volumes, String opId) throws ControllerException {
    TaskCompleter taskCompleter = null;
    WorkflowStepCompleter.stepExecuting(opId);
    try {
        StorageSystem storageSystem = _dbClient.queryObject(StorageSystem.class, storage);
        taskCompleter = new BlockConsistencyGroupUpdateCompleter(consistencyGroup, opId);
        _blockDeviceController.getDevice(storageSystem.getSystemType()).doAddSnapshotSessionsToConsistencyGroup(storageSystem, consistencyGroup, volumes, taskCompleter);
    } catch (Exception e) {
        ServiceError serviceError = DeviceControllerException.errors.jobFailed(e);
        taskCompleter.error(_dbClient, serviceError);
        WorkflowStepCompleter.stepFailed(opId, serviceError);
        return false;
    }
    return true;
}
Also used : ServiceError(com.emc.storageos.svcs.errorhandling.model.ServiceError) BlockConsistencyGroupUpdateCompleter(com.emc.storageos.volumecontroller.impl.block.taskcompleter.BlockConsistencyGroupUpdateCompleter) TaskCompleter(com.emc.storageos.volumecontroller.TaskCompleter) WorkflowException(com.emc.storageos.workflow.WorkflowException) InternalException(com.emc.storageos.svcs.errorhandling.resources.InternalException) DeviceControllerException(com.emc.storageos.exceptions.DeviceControllerException) ControllerException(com.emc.storageos.volumecontroller.ControllerException) StorageSystem(com.emc.storageos.db.client.model.StorageSystem)

Example 7 with BlockConsistencyGroupUpdateCompleter

use of com.emc.storageos.volumecontroller.impl.block.taskcompleter.BlockConsistencyGroupUpdateCompleter in project coprhd-controller by CoprHD.

the class AbstractConsistencyGroupManager method updateConsistencyGroup.

/**
 * {@inheritDoc}
 */
@Override
public void updateConsistencyGroup(Workflow workflow, URI vplexURI, URI cgURI, List<URI> addVolumesList, List<URI> removeVolumesList, String opId) throws InternalException {
    BlockConsistencyGroupUpdateCompleter completer = new BlockConsistencyGroupUpdateCompleter(cgURI, opId);
    ServiceError error = VPlexApiException.errors.unsupportedConsistencyGroupOpError(UPDATE_CONSISTENCY_GROUP_METHOD_NAME, cgURI.toString());
    completer.error(dbClient, error);
}
Also used : ServiceError(com.emc.storageos.svcs.errorhandling.model.ServiceError) BlockConsistencyGroupUpdateCompleter(com.emc.storageos.volumecontroller.impl.block.taskcompleter.BlockConsistencyGroupUpdateCompleter)

Aggregations

BlockConsistencyGroupUpdateCompleter (com.emc.storageos.volumecontroller.impl.block.taskcompleter.BlockConsistencyGroupUpdateCompleter)7 StorageSystem (com.emc.storageos.db.client.model.StorageSystem)4 DeviceControllerException (com.emc.storageos.exceptions.DeviceControllerException)4 ServiceError (com.emc.storageos.svcs.errorhandling.model.ServiceError)4 InternalException (com.emc.storageos.svcs.errorhandling.resources.InternalException)4 ControllerException (com.emc.storageos.volumecontroller.ControllerException)4 TaskCompleter (com.emc.storageos.volumecontroller.TaskCompleter)4 WorkflowException (com.emc.storageos.workflow.WorkflowException)4 ArrayList (java.util.ArrayList)4 NamedURI (com.emc.storageos.db.client.model.NamedURI)3 Volume (com.emc.storageos.db.client.model.Volume)3 URI (java.net.URI)3 WorkflowService (com.emc.storageos.workflow.WorkflowService)2 Lists.newArrayList (com.google.common.collect.Lists.newArrayList)2 Test (org.junit.Test)2 BlockConsistencyGroup (com.emc.storageos.db.client.model.BlockConsistencyGroup)1 FCTN_MIRROR_TO_URI (com.emc.storageos.db.client.util.CommonTransformerFunctions.FCTN_MIRROR_TO_URI)1 DatabaseException (com.emc.storageos.db.exceptions.DatabaseException)1 BaseCollectionException (com.emc.storageos.plugins.BaseCollectionException)1 ApplicationTaskCompleter (com.emc.storageos.volumecontroller.impl.block.taskcompleter.ApplicationTaskCompleter)1