Search in sources :

Example 6 with VPlexDeviceInfo

use of com.emc.storageos.vplex.api.VPlexDeviceInfo in project coprhd-controller by CoprHD.

the class VplexBackendIngestionContext method mapDevices.

/**
 * Creates a Map of slot numbers to VPlexDeviceInfo child objects of a
 * given top level device VPlexDeviceInfo, for use in creating the
 * VPLEX native mirror map.
 *
 * @param parentDevice the top level device of this virtual volume
 *
 * @return a Map of slot numbers to VPlexDeviceInfo child objects
 */
private Map<String, VPlexDeviceInfo> mapDevices(VPlexDeviceInfo parentDevice) {
    _logger.info("\tmapping device " + parentDevice.getName());
    Map<String, VPlexDeviceInfo> mirrorDevices = new TreeMap<String, VPlexDeviceInfo>();
    for (VPlexDeviceInfo dev : parentDevice.getChildDeviceInfo()) {
        mirrorDevices.put(dev.getSlotNumber(), dev);
    }
    return mirrorDevices;
}
Also used : VPlexDeviceInfo(com.emc.storageos.vplex.api.VPlexDeviceInfo) TreeMap(java.util.TreeMap)

Aggregations

VPlexDeviceInfo (com.emc.storageos.vplex.api.VPlexDeviceInfo)6 StorageSystem (com.emc.storageos.db.client.model.StorageSystem)3 VPlexApiException (com.emc.storageos.vplex.api.VPlexApiException)3 VPlexDistributedDeviceInfo (com.emc.storageos.vplex.api.VPlexDistributedDeviceInfo)3 VPlexVirtualVolumeInfo (com.emc.storageos.vplex.api.VPlexVirtualVolumeInfo)3 HashMap (java.util.HashMap)3 TreeMap (java.util.TreeMap)3 StringMap (com.emc.storageos.db.client.model.StringMap)2 StringSetMap (com.emc.storageos.db.client.model.StringSetMap)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 InternalException (com.emc.storageos.svcs.errorhandling.resources.InternalException)2 InternalServerErrorException (com.emc.storageos.svcs.errorhandling.resources.InternalServerErrorException)2 ControllerException (com.emc.storageos.volumecontroller.ControllerException)2 VPlexApiClient (com.emc.storageos.vplex.api.VPlexApiClient)2 VPlexResourceInfo (com.emc.storageos.vplex.api.VPlexResourceInfo)2 VolumeInfo (com.emc.storageos.vplex.api.clientdata.VolumeInfo)2 WorkflowException (com.emc.storageos.workflow.WorkflowException)2 IOException (java.io.IOException)2