Search in sources :

Example 1 with SmisBlockDeleteMirrorJob

use of com.emc.storageos.volumecontroller.impl.smis.job.SmisBlockDeleteMirrorJob in project coprhd-controller by CoprHD.

the class AbstractMirrorOperations method deleteSingleVolumeMirror.

@Override
public void deleteSingleVolumeMirror(StorageSystem storage, URI mirror, TaskCompleter taskCompleter) throws DeviceControllerException {
    _log.info("deleteSingleVolumeMirror operation START");
    try {
        BlockMirror mirrorObj = _dbClient.queryObject(BlockMirror.class, mirror);
        if (storage.checkIfVmax3()) {
            _helper.removeVolumeFromParkingSLOStorageGroup(storage, new String[] { mirrorObj.getNativeId() }, false);
            _log.info("Done invoking remove volume {} from parking SLO storage group", mirrorObj.getNativeId());
        }
        CIMObjectPath mirrorPath = _cimPath.getBlockObjectPath(storage, mirrorObj);
        CIMObjectPath configSvcPath = _cimPath.getConfigSvcPath(storage);
        CIMArgument[] inArgs = _helper.getDeleteMirrorInputArguments(storage, mirrorPath);
        CIMArgument[] outArgs = new CIMArgument[5];
        _helper.invokeMethod(storage, configSvcPath, SmisConstants.RETURN_TO_STORAGE_POOL, inArgs, outArgs);
        CIMObjectPath job = _cimPath.getCimObjectPathFromOutputArgs(outArgs, SmisConstants.JOB);
        if (job != null) {
            ControllerServiceImpl.enqueueJob(new QueueJob(new SmisBlockDeleteMirrorJob(job, storage.getId(), taskCompleter)));
        }
    } catch (Exception e) {
        _log.info("Problem making SMI-S call: ", e);
        ServiceError serviceError = DeviceControllerErrors.smis.unableToCallStorageProvider(e.getMessage());
        taskCompleter.error(_dbClient, serviceError);
    }
}
Also used : ServiceError(com.emc.storageos.svcs.errorhandling.model.ServiceError) BlockMirror(com.emc.storageos.db.client.model.BlockMirror) CIMObjectPath(javax.cim.CIMObjectPath) QueueJob(com.emc.storageos.volumecontroller.impl.job.QueueJob) SmisBlockDeleteMirrorJob(com.emc.storageos.volumecontroller.impl.smis.job.SmisBlockDeleteMirrorJob) WBEMException(javax.wbem.WBEMException) InternalException(com.emc.storageos.svcs.errorhandling.resources.InternalException) DeviceControllerException(com.emc.storageos.exceptions.DeviceControllerException) CIMArgument(javax.cim.CIMArgument)

Aggregations

BlockMirror (com.emc.storageos.db.client.model.BlockMirror)1 DeviceControllerException (com.emc.storageos.exceptions.DeviceControllerException)1 ServiceError (com.emc.storageos.svcs.errorhandling.model.ServiceError)1 InternalException (com.emc.storageos.svcs.errorhandling.resources.InternalException)1 QueueJob (com.emc.storageos.volumecontroller.impl.job.QueueJob)1 SmisBlockDeleteMirrorJob (com.emc.storageos.volumecontroller.impl.smis.job.SmisBlockDeleteMirrorJob)1 CIMArgument (javax.cim.CIMArgument)1 CIMObjectPath (javax.cim.CIMObjectPath)1 WBEMException (javax.wbem.WBEMException)1