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);
}
}
Aggregations