Search in sources :

Example 1 with NetworkDeviceController

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

the class ExportProcessor method updateZoningMap.

private void updateZoningMap(UnManagedExportMask mask, List<Initiator> initiators, List<StoragePort> storagePorts) {
    NetworkDeviceController networkDeviceController = (NetworkDeviceController) _keyMap.get(Constants.networkDeviceController);
    try {
        ZoneInfoMap zoningMap = networkDeviceController.getInitiatorsZoneInfoMap(initiators, storagePorts);
        for (ZoneInfo zoneInfo : zoningMap.values()) {
            _logger.info("Found zone: {} for initiator {} and port {}", new Object[] { zoneInfo.getZoneName(), zoneInfo.getInitiatorWwn(), zoneInfo.getPortWwn() });
        }
        mask.setZoningMap(zoningMap);
    } catch (Exception ex) {
        _logger.error("Failed to get the zoning map for mask {}", mask.getMaskName());
        mask.setZoningMap(null);
    }
}
Also used : NetworkDeviceController(com.emc.storageos.networkcontroller.impl.NetworkDeviceController) ZoneInfoMap(com.emc.storageos.db.client.model.ZoneInfoMap) ZoneInfo(com.emc.storageos.db.client.model.ZoneInfo) BaseCollectionException(com.emc.storageos.plugins.BaseCollectionException)

Aggregations

ZoneInfo (com.emc.storageos.db.client.model.ZoneInfo)1 ZoneInfoMap (com.emc.storageos.db.client.model.ZoneInfoMap)1 NetworkDeviceController (com.emc.storageos.networkcontroller.impl.NetworkDeviceController)1 BaseCollectionException (com.emc.storageos.plugins.BaseCollectionException)1