Search in sources :

Example 11 with NetworkZoningParam

use of com.emc.storageos.networkcontroller.impl.NetworkZoningParam in project coprhd-controller by CoprHD.

the class AbstractDefaultMaskingOrchestrator method generateZoningAddInitiatorsWorkflow.

public String generateZoningAddInitiatorsWorkflow(Workflow workflow, String previousStep, ExportGroup exportGroup, Map<URI, List<URI>> exportMasksToInitiators) throws WorkflowException {
    URI exportGroupURI = exportGroup.getId();
    String zoningStep = workflow.createStepId();
    Workflow.Method zoningExecuteMethod = _networkDeviceController.zoneExportAddInitiatorsMethod(exportGroupURI, exportMasksToInitiators);
    List<NetworkZoningParam> zoningParams = NetworkZoningParam.convertExportMaskInitiatorMapsToNetworkZoningParam(exportGroupURI, exportMasksToInitiators, _dbClient);
    Workflow.Method zoningRollbackMethod = _networkDeviceController.zoneExportRemoveInitiatorsMethod(zoningParams);
    zoningStep = workflow.createStep((previousStep == null ? EXPORT_GROUP_ZONING_TASK : null), "Zoning subtask for export-group: " + exportGroupURI, previousStep, NullColumnValueGetter.getNullURI(), "network-system", _networkDeviceController.getClass(), zoningExecuteMethod, zoningRollbackMethod, zoningStep);
    return zoningStep;
}
Also used : Workflow(com.emc.storageos.workflow.Workflow) URI(java.net.URI) NetworkZoningParam(com.emc.storageos.networkcontroller.impl.NetworkZoningParam)

Example 12 with NetworkZoningParam

use of com.emc.storageos.networkcontroller.impl.NetworkZoningParam in project coprhd-controller by CoprHD.

the class AbstractDefaultMaskingOrchestrator method generateZoningRemoveVolumesWorkflow.

protected String generateZoningRemoveVolumesWorkflow(Workflow workflow, String previousStep, ExportGroup exportGroup, List<ExportMask> exportMasks, Collection<URI> volumeURIs) throws WorkflowException {
    URI exportGroupURI = exportGroup.getId();
    List<URI> exportMaskURIs = new ArrayList<URI>();
    for (ExportMask mask : exportMasks) {
        exportMaskURIs.add(mask.getId());
    }
    List<NetworkZoningParam> zoningParams = NetworkZoningParam.convertExportMasksToNetworkZoningParam(exportGroup.getId(), exportMaskURIs, _dbClient);
    String zoningStep = workflow.createStepId();
    Workflow.Method zoningExecuteMethod = _networkDeviceController.zoneExportRemoveVolumesMethod(zoningParams, volumeURIs);
    zoningStep = workflow.createStep((previousStep == null ? EXPORT_GROUP_ZONING_TASK : null), "Zoning subtask for export-group: " + exportGroupURI, previousStep, NullColumnValueGetter.getNullURI(), "network-system", _networkDeviceController.getClass(), zoningExecuteMethod, null, zoningStep);
    return zoningStep;
}
Also used : ExportMask(com.emc.storageos.db.client.model.ExportMask) ArrayList(java.util.ArrayList) Workflow(com.emc.storageos.workflow.Workflow) URI(java.net.URI) NetworkZoningParam(com.emc.storageos.networkcontroller.impl.NetworkZoningParam)

Aggregations

NetworkZoningParam (com.emc.storageos.networkcontroller.impl.NetworkZoningParam)12 Workflow (com.emc.storageos.workflow.Workflow)12 URI (java.net.URI)11 ArrayList (java.util.ArrayList)9 ExportMask (com.emc.storageos.db.client.model.ExportMask)6 NamedURI (com.emc.storageos.db.client.model.NamedURI)5 ExportGroup (com.emc.storageos.db.client.model.ExportGroup)4 URIQueryResultList (com.emc.storageos.db.client.constraint.URIQueryResultList)3 HashSet (java.util.HashSet)3 Initiator (com.emc.storageos.db.client.model.Initiator)2 StorageSystem (com.emc.storageos.db.client.model.StorageSystem)2 Volume (com.emc.storageos.db.client.model.Volume)2 DatabaseException (com.emc.storageos.db.exceptions.DatabaseException)2 DeviceControllerException (com.emc.storageos.exceptions.DeviceControllerException)2 ServiceError (com.emc.storageos.svcs.errorhandling.model.ServiceError)2 InternalException (com.emc.storageos.svcs.errorhandling.resources.InternalException)2 InternalServerErrorException (com.emc.storageos.svcs.errorhandling.resources.InternalServerErrorException)2 ApplicationAddVolumeList (com.emc.storageos.volumecontroller.ApplicationAddVolumeList)2 ControllerException (com.emc.storageos.volumecontroller.ControllerException)2 VplexBackEndMaskingOrchestrator (com.emc.storageos.volumecontroller.impl.block.VplexBackEndMaskingOrchestrator)2