use of com.emc.storageos.volumecontroller.impl.block.taskcompleter.VolumeUpdateCompleter in project coprhd-controller by CoprHD.
the class VnxMaskingOrchestrator method exportGroupChangePolicyAndLimits.
@Override
public void exportGroupChangePolicyAndLimits(URI storageURI, URI exportMaskURI, URI exportGroupURI, List<URI> volumeURIs, URI newVpoolURI, boolean rollback, String token) throws Exception {
// EXportGroup and ExportMask URIs will be null for VNX.
VolumeUpdateCompleter taskCompleter = new VolumeUpdateCompleter(volumeURIs, token);
StorageSystem storage = _dbClient.queryObject(StorageSystem.class, storageURI);
VirtualPool newVpool = _dbClient.queryObject(VirtualPool.class, newVpoolURI);
BlockStorageDevice device = getDevice();
device.updatePolicyAndLimits(storage, null, volumeURIs, newVpool, rollback, taskCompleter);
}
use of com.emc.storageos.volumecontroller.impl.block.taskcompleter.VolumeUpdateCompleter in project coprhd-controller by CoprHD.
the class HDSMaskingOrchestrator method exportGroupChangePolicyAndLimits.
@Override
public void exportGroupChangePolicyAndLimits(URI storageURI, URI exportMaskURI, URI exportGroupURI, List<URI> volumeURIs, URI newVpoolURI, boolean rollback, String token) throws Exception {
// ExportGroup and ExportMask URIs will be null for HDS.
VolumeUpdateCompleter taskCompleter = new VolumeUpdateCompleter(volumeURIs, token);
StorageSystem storage = _dbClient.queryObject(StorageSystem.class, storageURI);
VirtualPool newVpool = _dbClient.queryObject(VirtualPool.class, newVpoolURI);
BlockStorageDevice device = getDevice();
device.updatePolicyAndLimits(storage, null, volumeURIs, newVpool, rollback, taskCompleter);
}
use of com.emc.storageos.volumecontroller.impl.block.taskcompleter.VolumeUpdateCompleter in project coprhd-controller by CoprHD.
the class VmaxMaskingOrchestrator method changeAutoTieringPolicy.
@Override
public void changeAutoTieringPolicy(URI storageURI, List<URI> volumeURIs, URI newVpoolURI, boolean rollback, String token) throws Exception {
VolumeUpdateCompleter taskCompleter = new VolumeUpdateCompleter(volumeURIs, token);
StorageSystem storage = _dbClient.queryObject(StorageSystem.class, storageURI);
VirtualPool newVpool = _dbClient.queryObject(VirtualPool.class, newVpoolURI);
BlockStorageDevice device = getDevice();
device.updatePolicyAndLimits(storage, null, volumeURIs, newVpool, rollback, taskCompleter);
}
use of com.emc.storageos.volumecontroller.impl.block.taskcompleter.VolumeUpdateCompleter in project coprhd-controller by CoprHD.
the class BlockDeviceController method modifyVolumes.
/**
* {@inheritDoc} NOTE NOTE: The signature here MUST match the Workflow.Method modifyVolumesMethod just above (except
* opId).
* Currently this workflow step is used only for Hitachi Thin Volumes modification to update volume tieringPolicy.
* Hitachi allows setting of tieringpolicy at LDEV level, hence We should have a LDEV id of a LogicalUnit.
* But LDEV is only created after we LogicalUnit is created. Hence createVolumes workflow includes creation of LU
* (i.e. LDEV)
* And LDEV modification (to set tieringPolicy.)
*/
@Override
public void modifyVolumes(URI systemURI, URI poolURI, List<URI> volumeURIs, String opId) throws ControllerException {
List<Volume> volumes = new ArrayList<Volume>();
try {
StorageSystem storageSystem = _dbClient.queryObject(StorageSystem.class, systemURI);
List<VolumeTaskCompleter> volumeCompleters = new ArrayList<VolumeTaskCompleter>();
Iterator<URI> volumeURIsIter = volumeURIs.iterator();
StringBuilder logMsgBuilder = new StringBuilder(String.format("moidfyVolumes start - Array:%s Pool:%s", systemURI.toString(), poolURI.toString()));
while (volumeURIsIter.hasNext()) {
URI volumeURI = volumeURIsIter.next();
logMsgBuilder.append(String.format("%nVolume:%s", volumeURI.toString()));
Volume volume = _dbClient.queryObject(Volume.class, volumeURI);
volumes.add(volume);
VolumeUpdateCompleter volumeCompleter = new VolumeUpdateCompleter(volumeURI, opId);
volumeCompleters.add(volumeCompleter);
}
_log.info(logMsgBuilder.toString());
StoragePool storagePool = _dbClient.queryObject(StoragePool.class, poolURI);
MultiVolumeTaskCompleter completer = new MultiVolumeTaskCompleter(volumeURIs, volumeCompleters, opId);
WorkflowStepCompleter.stepExecuting(completer.getOpId());
getDevice(storageSystem.getSystemType()).doModifyVolumes(storageSystem, storagePool, opId, volumes, completer);
logMsgBuilder = new StringBuilder(String.format("modifyVolumes end - Array:%s Pool:%s", systemURI.toString(), poolURI.toString()));
volumeURIsIter = volumeURIs.iterator();
while (volumeURIsIter.hasNext()) {
logMsgBuilder.append(String.format("%nVolume:%s", volumeURIsIter.next().toString()));
}
_log.info(logMsgBuilder.toString());
} catch (InternalException e) {
_log.error(String.format("modifyVolumes Failed - Array: %s Pool:%s Volume:%s", systemURI.toString(), poolURI.toString(), Joiner.on("\t").join(volumeURIs)));
doFailTask(Volume.class, volumeURIs, opId, e);
WorkflowStepCompleter.stepFailed(opId, e);
} catch (Exception e) {
_log.error(String.format("modifyVolumes Failed - Array: %s Pool:%s Volume:%s", systemURI.toString(), poolURI.toString(), Joiner.on("\t").join(volumeURIs)));
ServiceError serviceError = DeviceControllerException.errors.jobFailed(e);
doFailTask(Volume.class, volumeURIs, opId, serviceError);
WorkflowStepCompleter.stepFailed(opId, serviceError);
}
}
Aggregations