Search in sources :

Example 6 with IngestionRequestContext

use of com.emc.storageos.api.service.impl.resource.blockingestorchestration.context.IngestionRequestContext in project coprhd-controller by CoprHD.

the class RecoverPointVolumeIngestionContext method findExportGroup.

/*
     * (non-Javadoc)
     * 
     * @see com.emc.storageos.api.service.impl.resource.blockingestorchestration.context.IngestionRequestContext#findExportGroup(java.lang.
     * String)
     */
@Override
public ExportGroup findExportGroup(String exportGroupLabel, URI project, URI varray, URI computeResource, String resourceType) {
    if (exportGroupLabel != null) {
        for (ExportGroup localExportGroup : getRpExportGroupMap().keySet()) {
            if (null != localExportGroup && exportGroupLabel.equals(localExportGroup.getLabel())) {
                if (VolumeIngestionUtil.verifyExportGroupMatches(localExportGroup, exportGroupLabel, project, varray, computeResource, resourceType)) {
                    _logger.info("Found existing local ExportGroup {} in RP ingestion request context", localExportGroup.forDisplay());
                    return localExportGroup;
                }
            }
        }
    }
    ExportGroup nestedExportGroup = null;
    for (VolumeIngestionContext volumeContext : getProcessedUnManagedVolumeMap().values()) {
        if (volumeContext instanceof IngestionRequestContext) {
            nestedExportGroup = ((IngestionRequestContext) volumeContext).findExportGroup(exportGroupLabel, project, varray, computeResource, resourceType);
        }
        if (null != nestedExportGroup) {
            if (VolumeIngestionUtil.verifyExportGroupMatches(nestedExportGroup, exportGroupLabel, project, varray, computeResource, resourceType)) {
                _logger.info("Found existing nested ExportGroup {} in volume context {}", nestedExportGroup.forDisplay(), volumeContext.getUnmanagedVolume().forDisplay());
                return nestedExportGroup;
            }
        }
    }
    _logger.info("Could not find existing export group for label " + exportGroupLabel);
    return null;
}
Also used : ExportGroup(com.emc.storageos.db.client.model.ExportGroup) IngestionRequestContext(com.emc.storageos.api.service.impl.resource.blockingestorchestration.context.IngestionRequestContext) VolumeIngestionContext(com.emc.storageos.api.service.impl.resource.blockingestorchestration.context.VolumeIngestionContext)

Aggregations

IngestionRequestContext (com.emc.storageos.api.service.impl.resource.blockingestorchestration.context.IngestionRequestContext)6 VolumeIngestionContext (com.emc.storageos.api.service.impl.resource.blockingestorchestration.context.VolumeIngestionContext)6 UnManagedVolume (com.emc.storageos.db.client.model.UnManagedDiscoveredObjects.UnManagedVolume)4 BlockSnapshot (com.emc.storageos.db.client.model.BlockSnapshot)3 DataObject (com.emc.storageos.db.client.model.DataObject)3 ArrayList (java.util.ArrayList)3 RecoverPointVolumeIngestionContext (com.emc.storageos.api.service.impl.resource.blockingestorchestration.context.impl.RecoverPointVolumeIngestionContext)2 RpVplexVolumeIngestionContext (com.emc.storageos.api.service.impl.resource.blockingestorchestration.context.impl.RpVplexVolumeIngestionContext)2 VplexVolumeIngestionContext (com.emc.storageos.api.service.impl.resource.blockingestorchestration.context.impl.VplexVolumeIngestionContext)2 BlockSnapshotSession (com.emc.storageos.db.client.model.BlockSnapshotSession)2 ExportGroup (com.emc.storageos.db.client.model.ExportGroup)2 StringSet (com.emc.storageos.db.client.model.StringSet)2 Volume (com.emc.storageos.db.client.model.Volume)2 BlockVolumeIngestionContext (com.emc.storageos.api.service.impl.resource.blockingestorchestration.context.impl.BlockVolumeIngestionContext)1 BlockMirror (com.emc.storageos.db.client.model.BlockMirror)1 BlockObject (com.emc.storageos.db.client.model.BlockObject)1 UnManagedProtectionSet (com.emc.storageos.db.client.model.UnManagedDiscoveredObjects.UnManagedProtectionSet)1