Search in sources :

Example 26 with NetworkLite

use of com.emc.storageos.util.NetworkLite in project coprhd-controller by CoprHD.

the class VPlexBackendManager method populateNetworkMap.

/**
 * Populates the Network Lite structures
 *
 * @param initiatorMap
 * @param networkMap
 */
private void populateNetworkMap(Set<URI> networks, Map<URI, NetworkLite> networkMap) {
    for (URI networkURI : networks) {
        NetworkLite lite = NetworkUtil.getNetworkLite(networkURI, _dbClient);
        networkMap.put(networkURI, lite);
    }
}
Also used : NetworkLite(com.emc.storageos.util.NetworkLite) URI(java.net.URI)

Example 27 with NetworkLite

use of com.emc.storageos.util.NetworkLite in project coprhd-controller by CoprHD.

the class VPlexHDSMaskingOrchestratorTest method getNet8Ports.

private static PortAllocationContext getNet8Ports(Map<URI, NetworkLite> networkMap, Map<URI, List<StoragePort>> allocatablePorts) {
    String label = "net8";
    URI id = URI.create(label);
    NetworkLite net = new NetworkLite(id, label);
    networkMap.put(id, net);
    PortAllocationContext context = new PortAllocationContext(net, label);
    StoragePort port = null;
    List<StoragePort> ports = new ArrayList<StoragePort>();
    port = createFCPort("FA-1F:0", "50:00:00:00:00:00:00:1F:00");
    ports.add(port);
    port = createFCPort("FA-2F:0", "50:00:00:00:00:00:00:2F:00");
    ports.add(port);
    port = createFCPort("FA-3F:0", "50:00:00:00:00:00:00:3F:00");
    ports.add(port);
    port = createFCPort("FA-4F:0", "50:00:00:00:00:00:00:4F:00");
    ports.add(port);
    port = createFCPort("FA-5F:0", "50:00:00:00:00:00:00:5F:00");
    ports.add(port);
    port = createFCPort("FA-6F:0", "50:00:00:00:00:00:00:6F:00");
    ports.add(port);
    port = createFCPort("FA-7F:0", "50:00:00:00:00:00:00:7F:00");
    ports.add(port);
    port = createFCPort("FA-8F:0", "50:00:00:00:00:00:00:8F:00");
    ports.add(port);
    port = createFCPort("FA-9F:0", "50:00:00:00:00:00:00:9F:00");
    ports.add(port);
    port = createFCPort("FA-10F:0", "50:00:00:00:00:00:00:AF:00");
    ports.add(port);
    port = createFCPort("FA-11F:0", "50:00:00:00:00:00:00:BF:00");
    ports.add(port);
    port = createFCPort("FA-1H:0", "50:00:00:00:00:00:00:12:00");
    ports.add(port);
    port = createFCPort("FA-2H:0", "50:00:00:00:00:00:00:22:00");
    ports.add(port);
    port = createFCPort("FA-3H:0", "50:00:00:00:00:00:00:32:00");
    ports.add(port);
    port = createFCPort("FA-4H:0", "50:00:00:00:00:00:00:42:00");
    ports.add(port);
    port = createFCPort("FA-5H:0", "50:00:00:00:00:00:00:52:00");
    ports.add(port);
    port = createFCPort("FA-6H:0", "50:00:00:00:00:00:00:62:00");
    ports.add(port);
    port = createFCPort("FA-7H:0", "50:00:00:00:00:00:00:72:00");
    ports.add(port);
    port = createFCPort("FA-8H:0", "50:00:00:00:00:00:00:82:00");
    ports.add(port);
    port = createFCPort("FA-9H:0", "50:00:00:00:00:00:00:92:00");
    ports.add(port);
    port = createFCPort("FA-10H:0", "50:00:00:00:00:00:00:A2:00");
    ports.add(port);
    // duplicate cpu
    port = createFCPort("FA-11G:1", "50:00:00:00:00:00:00:B1:01");
    ports.add(port);
    port = createFCPort("FA-12H:0", "50:00:00:00:00:00:00:C2:00");
    ports.add(port);
    allocatablePorts.put(id, ports);
    return context;
}
Also used : NetworkLite(com.emc.storageos.util.NetworkLite) StoragePort(com.emc.storageos.db.client.model.StoragePort) ArrayList(java.util.ArrayList) URI(java.net.URI) PortAllocationContext(com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext)

Example 28 with NetworkLite

use of com.emc.storageos.util.NetworkLite in project coprhd-controller by CoprHD.

the class VPlexHDSMaskingOrchestratorTest method getNet573BPorts.

private static PortAllocationContext getNet573BPorts(Map<URI, NetworkLite> networkMap, Map<URI, List<StoragePort>> allocatablePorts) {
    String label = "net573B";
    URI id = URI.create(label);
    NetworkLite net = new NetworkLite(id, label);
    networkMap.put(id, net);
    PortAllocationContext context = new PortAllocationContext(net, label);
    StoragePort port = null;
    List<StoragePort> ports = new ArrayList<StoragePort>();
    port = createFCPort("FA-7E:0", "50:00:09:73:00:18:95:18");
    ports.add(port);
    port = createFCPort("FA-9E:1", "50:00:09:73:00:18:95:21");
    ports.add(port);
    allocatablePorts.put(id, ports);
    return context;
}
Also used : NetworkLite(com.emc.storageos.util.NetworkLite) StoragePort(com.emc.storageos.db.client.model.StoragePort) ArrayList(java.util.ArrayList) URI(java.net.URI) PortAllocationContext(com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext)

Example 29 with NetworkLite

use of com.emc.storageos.util.NetworkLite in project coprhd-controller by CoprHD.

the class VPlexHDSMaskingOrchestratorTest method getNet4XPorts.

private static PortAllocationContext getNet4XPorts(Map<URI, NetworkLite> networkMap, Map<URI, List<StoragePort>> allocatablePorts) {
    String label = "net4X";
    URI id = URI.create(label);
    NetworkLite net = new NetworkLite(id, label);
    networkMap.put(id, net);
    PortAllocationContext context = new PortAllocationContext(net, label);
    StoragePort port = null;
    List<StoragePort> ports = new ArrayList<StoragePort>();
    port = createFCPort("FA-6F:0", "50:00:00:00:00:00:00:6F:00");
    ports.add(port);
    port = createFCPort("FA-6E:0", "50:00:00:00:00:00:00:6E:00");
    ports.add(port);
    port = createFCPort("FA-6G:0", "50:00:00:00:00:00:00:6G:00");
    ports.add(port);
    port = createFCPort("FA-6H:0", "50:00:00:00:00:00:00:6H:00");
    ports.add(port);
    allocatablePorts.put(id, ports);
    return context;
}
Also used : NetworkLite(com.emc.storageos.util.NetworkLite) StoragePort(com.emc.storageos.db.client.model.StoragePort) ArrayList(java.util.ArrayList) URI(java.net.URI) PortAllocationContext(com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext)

Example 30 with NetworkLite

use of com.emc.storageos.util.NetworkLite in project coprhd-controller by CoprHD.

the class VPlexHDSMaskingOrchestratorTest method getNet7Ports.

private static PortAllocationContext getNet7Ports(Map<URI, NetworkLite> networkMap, Map<URI, List<StoragePort>> allocatablePorts) {
    String label = "net7";
    URI id = URI.create(label);
    NetworkLite net = new NetworkLite(id, label);
    networkMap.put(id, net);
    PortAllocationContext context = new PortAllocationContext(net, label);
    StoragePort port = null;
    List<StoragePort> ports = new ArrayList<StoragePort>();
    port = createFCPort("FA-1E:0", "50:00:00:00:00:00:00:1E:00");
    ports.add(port);
    port = createFCPort("FA-2E:0", "50:00:00:00:00:00:00:2E:00");
    ports.add(port);
    port = createFCPort("FA-3E:0", "50:00:00:00:00:00:00:3E:00");
    ports.add(port);
    port = createFCPort("FA-4E:0", "50:00:00:00:00:00:00:4E:00");
    ports.add(port);
    port = createFCPort("FA-5E:0", "50:00:00:00:00:00:00:5E:00");
    ports.add(port);
    port = createFCPort("FA-6E:0", "50:00:00:00:00:00:00:6E:00");
    ports.add(port);
    port = createFCPort("FA-7E:0", "50:00:00:00:00:00:00:7E:00");
    ports.add(port);
    port = createFCPort("FA-8E:0", "50:00:00:00:00:00:00:8E:00");
    ports.add(port);
    port = createFCPort("FA-9E:0", "50:00:00:00:00:00:00:9E:00");
    ports.add(port);
    port = createFCPort("FA-10E:0", "50:00:00:00:00:00:00:AE:00");
    ports.add(port);
    port = createFCPort("FA-11E:0", "50:00:00:00:00:00:00:BE:00");
    ports.add(port);
    port = createFCPort("FA-1G:0", "50:00:00:00:00:00:00:21:00");
    ports.add(port);
    port = createFCPort("FA-2G:0", "50:00:00:00:00:00:00:31:00");
    ports.add(port);
    port = createFCPort("FA-3G:0", "50:00:00:00:00:00:00:41:00");
    ports.add(port);
    port = createFCPort("FA-4G:0", "50:00:00:00:00:00:00:51:00");
    ports.add(port);
    port = createFCPort("FA-5G:0", "50:00:00:00:00:00:00:61:00");
    ports.add(port);
    port = createFCPort("FA-6G:0", "50:00:00:00:00:00:00:61:00");
    ports.add(port);
    port = createFCPort("FA-7G:0", "50:00:00:00:00:00:00:71:00");
    ports.add(port);
    port = createFCPort("FA-8G:0", "50:00:00:00:00:00:00:81:00");
    ports.add(port);
    port = createFCPort("FA-9G:0", "50:00:00:00:00:00:00:91:00");
    ports.add(port);
    port = createFCPort("FA-10G:0", "50:00:00:00:00:00:00:A1:00");
    ports.add(port);
    port = createFCPort("FA-11G:0", "50:00:00:00:00:00:00:B1:00");
    ports.add(port);
    allocatablePorts.put(id, ports);
    return context;
}
Also used : NetworkLite(com.emc.storageos.util.NetworkLite) StoragePort(com.emc.storageos.db.client.model.StoragePort) ArrayList(java.util.ArrayList) URI(java.net.URI) PortAllocationContext(com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext)

Aggregations

NetworkLite (com.emc.storageos.util.NetworkLite)130 StoragePort (com.emc.storageos.db.client.model.StoragePort)110 URI (java.net.URI)86 ArrayList (java.util.ArrayList)85 PortAllocationContext (com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext)82 HashMap (java.util.HashMap)48 List (java.util.List)44 StringSetMap (com.emc.storageos.db.client.model.StringSetMap)25 URIQueryResultList (com.emc.storageos.db.client.constraint.URIQueryResultList)22 Map (java.util.Map)22 HashSet (java.util.HashSet)20 Initiator (com.emc.storageos.db.client.model.Initiator)19 StringSet (com.emc.storageos.db.client.model.StringSet)19 TreeMap (java.util.TreeMap)10 Set (java.util.Set)9 SortedMap (java.util.SortedMap)9 StringMap (com.emc.storageos.db.client.model.StringMap)7 StoragePortsAllocator (com.emc.storageos.volumecontroller.placement.StoragePortsAllocator)6 DummyDbClient (com.emc.storageos.util.DummyDbClient)4 PortAllocatorTestContext (com.emc.storageos.volumecontroller.placement.PortAllocatorTestContext)4