use of com.emc.storageos.db.client.model.DiscoveredSystemObject in project coprhd-controller by CoprHD.
the class ExportWorkflowEntryPoints method exportRemoveInitiators.
public void exportRemoveInitiators(URI storageURI, URI exportGroupURI, List<URI> initiatorURIs, String token) throws ControllerException {
try {
WorkflowStepCompleter.stepExecuting(token);
final String workflowKey = "exportRemoveInitiators";
if (!WorkflowService.getInstance().hasWorkflowBeenCreated(token, workflowKey)) {
DiscoveredSystemObject storage = ExportWorkflowUtils.getStorageSystem(_dbClient, storageURI);
MaskingOrchestrator orchestrator = getOrchestrator(storage.getSystemType());
orchestrator.exportGroupRemoveInitiators(storageURI, exportGroupURI, initiatorURIs, token);
// Mark this workflow as created/executed so we don't do it again on retry/resume
WorkflowService.getInstance().markWorkflowBeenCreated(token, workflowKey);
}
} catch (Exception e) {
DeviceControllerException exception = DeviceControllerException.exceptions.exportRemoveInitiators(e);
WorkflowStepCompleter.stepFailed(token, exception);
throw exception;
}
}
use of com.emc.storageos.db.client.model.DiscoveredSystemObject in project coprhd-controller by CoprHD.
the class ExportWorkflowEntryPoints method exportChangePolicyAndLimits.
public void exportChangePolicyAndLimits(URI storageURI, URI exportMaskURI, URI exportGroupURI, List<URI> volumeURIs, URI newVpoolURI, boolean rollback, String token) throws ControllerException {
try {
WorkflowStepCompleter.stepExecuting(token);
DiscoveredSystemObject storage = ExportWorkflowUtils.getStorageSystem(_dbClient, storageURI);
MaskingOrchestrator orchestrator = getOrchestrator(storage.getSystemType());
((AbstractBasicMaskingOrchestrator) orchestrator).exportGroupChangePolicyAndLimits(storageURI, exportMaskURI, exportGroupURI, volumeURIs, newVpoolURI, rollback, token);
} catch (Exception e) {
DeviceControllerException exception = DeviceControllerException.exceptions.exportChangePolicyAndLimits(e);
WorkflowStepCompleter.stepFailed(token, exception);
throw exception;
}
}
use of com.emc.storageos.db.client.model.DiscoveredSystemObject in project coprhd-controller by CoprHD.
the class ExportWorkflowEntryPoints method exportRemoveVolumes.
public void exportRemoveVolumes(URI storageURI, URI exportGroupURI, List<URI> volumes, String token) throws ControllerException {
try {
WorkflowStepCompleter.stepExecuting(token);
final String workflowKey = "exportRemoveVolumes";
if (!WorkflowService.getInstance().hasWorkflowBeenCreated(token, workflowKey)) {
DiscoveredSystemObject storage = ExportWorkflowUtils.getStorageSystem(_dbClient, storageURI);
MaskingOrchestrator orchestrator = getOrchestrator(storage.getSystemType());
orchestrator.exportGroupRemoveVolumes(storageURI, exportGroupURI, volumes, token);
// Mark this workflow as created/executed so we don't do it again on retry/resume
WorkflowService.getInstance().markWorkflowBeenCreated(token, workflowKey);
}
} catch (Exception e) {
DeviceControllerException exception = DeviceControllerException.exceptions.exportRemoveVolumes(e);
WorkflowStepCompleter.stepFailed(token, exception);
throw exception;
}
}
Aggregations