use of com.emc.storageos.volumecontroller.impl.smis.job.SmisBlockDeleteListReplicaJob in project coprhd-controller by CoprHD.
the class AbstractReplicaOperations method deleteListReplica.
@Override
public void deleteListReplica(StorageSystem storage, List<URI> replicaList, TaskCompleter taskCompleter) throws DeviceControllerException {
_log.info("deleteListReplica operation START");
if (!((storage.getUsingSmis80() && storage.deviceIsType(Type.vmax)) || storage.deviceIsType(Type.vnxblock))) {
throw DeviceControllerException.exceptions.blockDeviceOperationNotSupported();
}
try {
String[] deviceIds = _helper.getBlockObjectNativeIds(replicaList);
if (storage.checkIfVmax3()) {
_helper.removeVolumeFromParkingSLOStorageGroup(storage, deviceIds, false);
_log.info("Done invoking remove volumes from parking SLO storage group");
}
CIMObjectPath[] devicePaths = _cimPath.getVolumePaths(storage, deviceIds);
CIMObjectPath configSvcPath = _cimPath.getConfigSvcPath(storage);
CIMArgument[] inArgs = null;
if (storage.deviceIsType(Type.vnxblock)) {
inArgs = _helper.getReturnElementsToStoragePoolArguments(devicePaths);
} else {
inArgs = _helper.getReturnElementsToStoragePoolArguments(devicePaths, SmisConstants.CONTINUE_ON_NONEXISTENT_ELEMENT);
}
CIMArgument[] outArgs = new CIMArgument[5];
_helper.invokeMethod(storage, configSvcPath, SmisConstants.RETURN_ELEMENTS_TO_STORAGE_POOL, inArgs, outArgs);
CIMObjectPath job = _cimPath.getCimObjectPathFromOutputArgs(outArgs, SmisConstants.JOB);
ControllerServiceImpl.enqueueJob(new QueueJob(new SmisBlockDeleteListReplicaJob(job, storage.getId(), taskCompleter)));
} catch (Exception e) {
_log.error("Problem making SMI-S call: ", e);
ServiceError serviceError = DeviceControllerErrors.smis.unableToCallStorageProvider(e.getMessage());
taskCompleter.error(_dbClient, serviceError);
}
}
Aggregations