Search in sources :

Example 21 with PortAllocationContext

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

the class VPlexXtremIOMaskingOrchestratorTest 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("X1-SC1:fc2", "50:00:00:00:00:00:00:1F:00");
    ports.add(port);
    port = createFCPort("X1-SC2:fc2", "50:00:00:00:00:00:00:2F:00");
    ports.add(port);
    port = createFCPort("X2-SC1:fc2", "50:00:00:00:00:00:00:3F:00");
    ports.add(port);
    port = createFCPort("X2-SC2:fc2", "50:00:00:00:00:00:00:4F:00");
    ports.add(port);
    port = createFCPort("X3-SC1:fc2", "50:00:00:00:00:00:00:5F:00");
    ports.add(port);
    port = createFCPort("X3-SC2:fc2", "50:00:00:00:00:00:00:6F:00");
    ports.add(port);
    port = createFCPort("X4-SC1:fc2", "50:00:00:00:00:00:00:7F:00");
    ports.add(port);
    port = createFCPort("X4-SC2:fc2", "50:00:00:00:00:00:00:8F: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 22 with PortAllocationContext

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

the class StoragePortsAllocatorTest method createTzone2IP.

protected static PortAllocationContext createTzone2IP() {
    NetworkLite tz = new NetworkLite("TzoneIP2");
    PortAllocationContext context = new PortAllocationContext(tz, "test");
    StoragePort port;
    port = createIPPort("SP_A:2", "iqn.1992-04.com.emc:cx.apm00121500018.a2");
    addPort(context, port, null);
    port = createIPPort("SP_A:3", "iqn.1992-04.com.emc:cx.apm00121500018.a3");
    addPort(context, port, null);
    port = createIPPort("SP_B:2", "iqn.1992-04.com.emc:cx.apm00121500018.b2");
    addPort(context, port, null);
    port = createIPPort("SP_B:3", "iqn.1992-04.com.emc:cx.apm00121500018.b3");
    addPort(context, port, null);
    port = createIPPort("SP_C:2", "iqn.1992-04.com.emc:cx.apm00121500018.c2");
    addPort(context, port, null);
    port = createIPPort("SP_C:3", "iqn.1992-04.com.emc:cx.apm00121500018.c3");
    addPort(context, port, null);
    port = createIPPort("SP_D:2", "iqn.1992-04.com.emc:cx.apm00121500018.d2");
    addPort(context, port, null);
    port = createIPPort("SP_D:3", "iqn.1992-04.com.emc:cx.apm00121500018.d3");
    addPort(context, port, null);
    return context;
}
Also used : NetworkLite(com.emc.storageos.util.NetworkLite) StoragePort(com.emc.storageos.db.client.model.StoragePort) PortAllocationContext(com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext)

Example 23 with PortAllocationContext

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

the class StoragePortsAllocatorTest method createVMAXWithCpuDuplication.

protected static PortAllocationContext createVMAXWithCpuDuplication() {
    NetworkLite tz = new NetworkLite("Tzon3e4p1");
    PortAllocationContext context = new PortAllocationContext(tz, "test");
    StoragePort port;
    port = createFCPort("FA-7E:0", "50:00:00:00:00:00:00:00");
    addPort(context, port, "mds-a");
    port = createFCPort("FA-7F:2", "50:00:00:00:00:01:00:02");
    addPort(context, port, "mds-b");
    port = createFCPort("FA-8E:0", "50:00:00:00:00:00:01:00");
    addPort(context, port, "mds-a");
    port = createFCPort("FA-8E:1", "50:00:00:00:00:00:01:01");
    addPort(context, port, "mds-a");
    return context;
}
Also used : NetworkLite(com.emc.storageos.util.NetworkLite) StoragePort(com.emc.storageos.db.client.model.StoragePort) PortAllocationContext(com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext)

Example 24 with PortAllocationContext

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

the class StoragePortsAllocatorTest method createTzone3IP.

protected static PortAllocationContext createTzone3IP() {
    NetworkLite tz = new NetworkLite("TzoneIP3");
    PortAllocationContext context = new PortAllocationContext(tz, "test");
    StoragePort port;
    port = createIPPort("SP_A:0", "iqn.1992-04.com.emc:cx.apm00121500018.a0");
    addPort(context, port, null);
    port = createIPPort("SP_A:1", "iqn.1992-04.com.emc:cx.apm00121500018.a1");
    addPort(context, port, null);
    port = createIPPort("SP_B:0", "iqn.1992-04.com.emc:cx.apm00121500018.b0");
    addPort(context, port, null);
    port = createIPPort("SP_B:1", "iqn.1992-04.com.emc:cx.apm00121500018.b1");
    addPort(context, port, null);
    return context;
}
Also used : NetworkLite(com.emc.storageos.util.NetworkLite) StoragePort(com.emc.storageos.db.client.model.StoragePort) PortAllocationContext(com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext)

Example 25 with PortAllocationContext

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

the class StoragePortsAllocatorTest method testIP.

private static void testIP() throws Exception {
    PortAllocationContext ctx = createVNX2director4portIP();
    StoragePortsAllocator allocator = new StoragePortsAllocator();
    if (!vmaxonly && !vplexonly) {
        alloc(allocator, 1, ctx, false);
        alloc(allocator, 2, ctx, false);
        alloc(allocator, 4, ctx, false);
        alloc(allocator, 8, ctx, false);
        alloc(allocator, 16, ctx, false);
        alloc(allocator, 32, ctx, false);
    }
    ctx = createVMAX3engine4portIP();
    allocator = new StoragePortsAllocator();
    if (!vnxonly && !vplexonly) {
        alloc(allocator, 1, ctx, false);
        alloc(allocator, 2, ctx, false);
        alloc(allocator, 4, ctx, false);
        alloc(allocator, 8, ctx, false);
        duplicateCpuExpected = true;
        alloc(allocator, 16, ctx, false);
        duplicateCpuExpected = true;
        alloc(allocator, 32, ctx, false);
        runIterations(50, allocator, 4, ctx, false);
        System.out.println("Symmetrical two transport zones each with four directors two ports each");
        test2tzones(1, createTzone1IP(), createTzone2IP(), false);
        test2tzones(2, createTzone1IP(), createTzone2IP(), false);
        test2tzones(4, createTzone1IP(), createTzone2IP(), false);
        System.out.println("Asymmetrical transport zones, one with two directors, one with one");
        test2tzones(1, createTzone3IP(), createTzone4IP(), false);
        test2tzones(2, createTzone3IP(), createTzone4IP(), false);
        test2tzones(4, createTzone3IP(), createTzone4IP(), false);
    }
}
Also used : 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