use of com.emc.storageos.db.client.model.DiscoveredSystemObject in project coprhd-controller by CoprHD.
the class ExportWorkflowUtils method generateChangeAutoTieringPolicy.
/**
* Generate a Workflow Step to change the Auto-tiering policy for the volumes
* in a specific Export Mask.
*
* @param workflow the workflow
* @param wfGroupId - Workflow group for the Step
* @param waitFor - Wait on this step/group to complete in the workflow before execution
* @param storageURI the storage system uri
* @param volumeURIs the volume uris
* @param newVpoolURI the new vpool uri
* @param oldVpoolURI the old vpool uri *
* @return stepId for the generated workflow Step
* @throws ControllerException the controller exception
*/
public String generateChangeAutoTieringPolicy(Workflow workflow, String wfGroupId, String waitFor, URI storageURI, List<URI> volumeURIs, URI newVpoolURI, URI oldVpoolURI) throws ControllerException {
DiscoveredSystemObject storageSystem = getStorageSystem(_dbClient, storageURI);
Workflow.Method method = ExportWorkflowEntryPoints.changeAutoTieringPolicyMethod(storageURI, volumeURIs, newVpoolURI, false);
// same method is called as a roll back step by passing old vPool.
// boolean is passed to differentiate it.
Workflow.Method rollback = ExportWorkflowEntryPoints.changeAutoTieringPolicyMethod(storageURI, volumeURIs, oldVpoolURI, true);
return newWorkflowStep(workflow, wfGroupId, String.format("Updating Auto-tiering Policy on storage array %s (%s, args) for volumes %s", storageSystem.getNativeGuid(), storageURI, Joiner.on("\t").join(volumeURIs)), storageSystem, method, rollback, waitFor, null);
}
use of com.emc.storageos.db.client.model.DiscoveredSystemObject in project coprhd-controller by CoprHD.
the class ExportWorkflowUtils method generateExportGroupChangePortWorkflow.
/**
* Generate step for change port group
*
* @param workflow - Workflow
* @param wfGroupId - Workflow group Id
* @param exportGroupURI - Export group URI
* @param portGroupURI - New port group URI
* @param exportMaskURIs - The URI list of affected export masks in the export group
* @param waitForApproval - If wait until approval
* @return - The generated step
* @throws ControllerException
*/
public String generateExportGroupChangePortWorkflow(Workflow workflow, String wfGroupId, URI exportGroupURI, URI portGroupURI, List<URI> exportMaskURIs, boolean waitForApproval) throws ControllerException {
Workflow.Method rollbackMethod = rollbackMethodNullMethod();
ExportGroup exportGroup = _dbClient.queryObject(ExportGroup.class, exportGroupURI);
StoragePortGroup portGroup = _dbClient.queryObject(StoragePortGroup.class, portGroupURI);
DiscoveredSystemObject system = _dbClient.queryObject(StorageSystem.class, portGroup.getStorageDevice());
Workflow.Method method = ExportWorkflowEntryPoints.exportChangePortGroupMethod(system.getId(), exportGroupURI, portGroupURI, exportMaskURIs, waitForApproval);
String stepDescription = String.format("Change port group to %s for the export group %s", portGroup.getNativeGuid(), exportGroup.getLabel());
return newWorkflowStep(workflow, wfGroupId, stepDescription, system, method, rollbackMethod, null);
}
use of com.emc.storageos.db.client.model.DiscoveredSystemObject in project coprhd-controller by CoprHD.
the class ExportWorkflowUtils method generateExportChangePolicyAndLimits.
/**
* Generate a Workflow Step to change the Auto-tiering policy for the volumes
* in a specific Export Mask.
*
* @param workflow the workflow
* @param wfGroupId - Workflow group for the Step
* @param waitFor - Wait on this step/group to complete in the workflow before execution
* @param storageURI the storage system uri
* @param exportMaskURI the export mask uri
* @param volumeURIs the volume uris
* @param exportGroupURI
* @param newVpoolURI the new vpool uri
* @return stepId for the generated workflow Step
* @throws ControllerException the controller exception
*/
public String generateExportChangePolicyAndLimits(Workflow workflow, String wfGroupId, String waitFor, URI storageURI, URI exportMaskURI, URI exportGroupURI, List<URI> volumeURIs, URI newVpoolURI, URI oldVpoolURI) throws ControllerException {
DiscoveredSystemObject storageSystem = getStorageSystem(_dbClient, storageURI);
Workflow.Method method = ExportWorkflowEntryPoints.exportChangePolicyAndLimitsMethod(storageURI, exportMaskURI, exportGroupURI, volumeURIs, newVpoolURI, false);
// same method is called as a roll back step by passing old vPool.
// boolean is passed to differentiate it.
Workflow.Method rollback = ExportWorkflowEntryPoints.exportChangePolicyAndLimitsMethod(storageURI, exportMaskURI, exportGroupURI, volumeURIs, oldVpoolURI, true);
return newWorkflowStep(workflow, wfGroupId, String.format("Updating Auto-tiering Policy on storage array %s (%s, args) for volumes %s", storageSystem.getNativeGuid(), storageURI, Joiner.on("\t").join(volumeURIs)), storageSystem, method, rollback, waitFor, null);
}
use of com.emc.storageos.db.client.model.DiscoveredSystemObject in project coprhd-controller by CoprHD.
the class ExportWorkflowUtils method generateExportGroupCreateWorkflow.
public String generateExportGroupCreateWorkflow(Workflow workflow, String wfGroupId, String waitFor, URI storage, URI export, Map<URI, Integer> volumeMap, List<URI> initiatorURIs) throws WorkflowException {
DiscoveredSystemObject storageSystem = getStorageSystem(_dbClient, storage);
// Filter the addedInitiators for non VPLEX system by the Export Group varray.
ExportGroup exportGroup = _dbClient.queryObject(ExportGroup.class, export);
initiatorURIs = ExportUtils.filterNonVplexInitiatorsByExportGroupVarray(exportGroup, initiatorURIs, storage, _dbClient);
Workflow.Method method = ExportWorkflowEntryPoints.exportGroupCreateMethod(storage, export, volumeMap, initiatorURIs);
Workflow.Method rollback = ExportWorkflowEntryPoints.exportGroupDeleteMethod(storage, export);
return newWorkflowStep(workflow, wfGroupId, String.format("Creating export (%s) on storage array %s", export, storageSystem.getNativeGuid()), storageSystem, method, rollback, waitFor, null);
}
use of com.emc.storageos.db.client.model.DiscoveredSystemObject in project coprhd-controller by CoprHD.
the class ExportWorkflowUtils method generateExportGroupDeleteWorkflow.
public String generateExportGroupDeleteWorkflow(Workflow workflow, String wfGroupId, String waitFor, URI storage, URI export) throws WorkflowException {
DiscoveredSystemObject storageSystem = getStorageSystem(_dbClient, storage);
Workflow.Method method = ExportWorkflowEntryPoints.exportGroupDeleteMethod(storage, export);
return newWorkflowStep(workflow, wfGroupId, String.format("Deleting export (%s) on storage array %s", export, storageSystem.getNativeGuid()), storageSystem, method, null, waitFor, null);
}
Aggregations