Search in sources :

Example 56 with PortAllocationContext

use of com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext in project coprhd-controller by CoprHD.

the class VPlexVmaxMaskingOrchestratorTest 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 57 with PortAllocationContext

use of com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext in project coprhd-controller by CoprHD.

the class VPlexVmaxMaskingOrchestratorTest 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 58 with PortAllocationContext

use of com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext in project coprhd-controller by CoprHD.

the class VPlexVmaxMaskingOrchestratorTest method getNet1Ports.

private static PortAllocationContext getNet1Ports(Map<URI, NetworkLite> networkMap, Map<URI, List<StoragePort>> allocatablePorts) {
    String label = "net1";
    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:00:00:00:00:00:7E:00");
    addPort(context, port, null);
    ports.add(port);
    port = createFCPort("FA-7F:0", "50:00:00:00:00:00:00:7F:00");
    addPort(context, port, null);
    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 59 with PortAllocationContext

use of com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext in project coprhd-controller by CoprHD.

the class VPlexVmaxMaskingOrchestratorTest method getNet1PortsSA.

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

Example 60 with PortAllocationContext

use of com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext in project coprhd-controller by CoprHD.

the class VPlexVmaxMaskingOrchestratorTest method getNet2PortsSA.

private static PortAllocationContext getNet2PortsSA(Map<URI, NetworkLite> networkMap, Map<URI, List<StoragePort>> allocatablePorts, Map<URI, Map<String, List<StoragePort>>> portSwitchMap) {
    String label = "net12";
    URI id = URI.create(label);
    NetworkLite net = new NetworkLite(id, label);
    networkMap.put(id, net);
    Map<String, List<StoragePort>> switchMap = new HashMap<String, List<StoragePort>>();
    PortAllocationContext context = new PortAllocationContext(net, label);
    StoragePort port = null;
    List<StoragePort> ports = new ArrayList<StoragePort>();
    port = createFCPort("FA-10E:0", "50:00:00:00:00:00:00:AE:00");
    addPort(context, port, "mds-b");
    ports.add(port);
    port = createFCPort("FA-10F:0", "50:00:00:00:00:00:00:AF:00");
    addPort(context, port, "mds-b");
    ports.add(port);
    allocatablePorts.put(id, ports);
    switchMap.put("mds-b", ports);
    portSwitchMap.put(id, switchMap);
    return context;
}
Also used : HashMap(java.util.HashMap) NetworkLite(com.emc.storageos.util.NetworkLite) StoragePort(com.emc.storageos.db.client.model.StoragePort) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) URI(java.net.URI) PortAllocationContext(com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext)

Aggregations

PortAllocationContext (com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext)95 StoragePort (com.emc.storageos.db.client.model.StoragePort)84 NetworkLite (com.emc.storageos.util.NetworkLite)82 URI (java.net.URI)65 ArrayList (java.util.ArrayList)65 HashMap (java.util.HashMap)28 List (java.util.List)27 Map (java.util.Map)20 Initiator (com.emc.storageos.db.client.model.Initiator)13 HashSet (java.util.HashSet)13 StringSetMap (com.emc.storageos.db.client.model.StringSetMap)10 Set (java.util.Set)7 StringMap (com.emc.storageos.db.client.model.StringMap)6 StringSet (com.emc.storageos.db.client.model.StringSet)6 StoragePortsAllocator (com.emc.storageos.volumecontroller.placement.StoragePortsAllocator)6 DummyDbClient (com.emc.storageos.util.DummyDbClient)5 PortAllocatorTestContext (com.emc.storageos.volumecontroller.placement.PortAllocatorTestContext)4 VPlexBackendManager (com.emc.storageos.vplexcontroller.VPlexBackendManager)4 ExportPathParams (com.emc.storageos.db.client.model.ExportPathParams)2