Search in sources :

Example 81 with PortAllocationContext

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

the class StoragePortsAllocatorTest method createTzone3FC.

protected static PortAllocationContext createTzone3FC() {
    NetworkLite tz = new NetworkLite("Tzone3");
    PortAllocationContext context = new PortAllocationContext(tz, "test");
    StoragePort port;
    port = createFCPort("FA-1E:0", "50:00:00:00:00:00:00:00");
    addPort(context, port, "mds-a");
    port = createFCPort("FA-1E:1", "50:00:00:00:00:00:00:01");
    addPort(context, port, "mds-a");
    port = createFCPort("FA-2E:0", "50:00:00:00:00:00:01:00");
    addPort(context, port, "mds-a");
    port = createFCPort("FA-2E: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 82 with PortAllocationContext

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

the class StoragePortsAllocatorTest method createTzone1IP.

protected static PortAllocationContext createTzone1IP() {
    NetworkLite tz = new NetworkLite("TzoneIP1");
    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);
    port = createIPPort("SP_C:0", "iqn.1992-04.com.emc:cx.apm00121500018.c0");
    addPort(context, port, null);
    port = createIPPort("SP_C:1", "iqn.1992-04.com.emc:cx.apm00121500018.c1");
    addPort(context, port, null);
    port = createIPPort("SP_D:0", "iqn.1992-04.com.emc:cx.apm00121500018.d0");
    addPort(context, port, null);
    port = createIPPort("SP_D:1", "iqn.1992-04.com.emc:cx.apm00121500018.d1");
    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 83 with PortAllocationContext

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

the class StoragePortsAllocatorTest method createVMAX3engine4portIP.

protected static PortAllocationContext createVMAX3engine4portIP() {
    NetworkLite tz = new NetworkLite("TzoneIP2");
    PortAllocationContext context = new PortAllocationContext(tz, "test");
    StoragePort port;
    port = createIPPort("FA-7E:0", "iqn.1992-04.com.emc:cx.apm00121500018.a0");
    addPort(context, port, null);
    port = createIPPort("FA-7E:1", "iqn.1992-04.com.emc:cx.apm00121500018.a1");
    addPort(context, port, null);
    port = createIPPort("FA-7F:2", "iqn.1992-04.com.emc:cx.apm00121500018.a2");
    addPort(context, port, null);
    port = createIPPort("FA-7F:3", "iqn.1992-04.com.emc:cx.apm00121500018.a3");
    addPort(context, port, null);
    port = createIPPort("FA-8E:0", "iqn.1992-04.com.emc:cx.apm00121500018.b0");
    addPort(context, port, null);
    port = createIPPort("FA-8E:1", "iqn.1992-04.com.emc:cx.apm00121500018.b1");
    addPort(context, port, null);
    port = createIPPort("FA-8F:2", "iqn.1992-04.com.emc:cx.apm00121500018.b2");
    addPort(context, port, null);
    port = createIPPort("FA-8F:3", "iqn.1992-04.com.emc:cx.apm00121500018.b3");
    addPort(context, port, null);
    port = createIPPort("FA-9E:0", "iqn.1992-04.com.emc:cx.apm00121500018.c0");
    addPort(context, port, null);
    port = createIPPort("FA-9E:1", "iqn.1992-04.com.emc:cx.apm00121500018.c1");
    addPort(context, port, null);
    port = createIPPort("FA-9F:2", "iqn.1992-04.com.emc:cx.apm00121500018.c2");
    addPort(context, port, null);
    port = createIPPort("FA-9F:3", "iqn.1992-04.com.emc:cx.apm00121500018.c3");
    addPort(context, port, null);
    port = createIPPort("FA-10E:0", "iqn.1992-04.com.emc:cx.apm00121500018.d0");
    addPort(context, port, null);
    port = createIPPort("FA-10E:1", "iqn.1992-04.com.emc:cx.apm00121500018.d1");
    addPort(context, port, null);
    port = createIPPort("FA-10F:2", "iqn.1992-04.com.emc:cx.apm00121500018.d2");
    addPort(context, port, null);
    port = createIPPort("FA-10F:3", "iqn.1992-04.com.emc:cx.apm00121500018.d3");
    addPort(context, port, null);
    port = createIPPort("FA-11E:0", "iqn.1992-04.com.emc:cx.apm00121500018.e0");
    addPort(context, port, null);
    port = createIPPort("FA-11E:1", "iqn.1992-04.com.emc:cx.apm00121500018.e1");
    addPort(context, port, null);
    port = createIPPort("FA-11F:2", "iqn.1992-04.com.emc:cx.apm00121500018.e2");
    addPort(context, port, null);
    port = createIPPort("FA-11F:3", "iqn.1992-04.com.emc:cx.apm00121500018.e3");
    addPort(context, port, null);
    port = createIPPort("FA-12E:0", "iqn.1992-04.com.emc:cx.apm00121500018.f0");
    addPort(context, port, null);
    port = createIPPort("FA-12E:1", "iqn.1992-04.com.emc:cx.apm00121500018.f1");
    addPort(context, port, null);
    port = createIPPort("FA-12F:2", "iqn.1992-04.com.emc:cx.apm00121500018.f2");
    addPort(context, port, null);
    port = createIPPort("FA-12F:3", "iqn.1992-04.com.emc:cx.apm00121500018.f3");
    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 84 with PortAllocationContext

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

the class StoragePortsAllocatorTest method createTzone4FC.

protected static PortAllocationContext createTzone4FC() {
    NetworkLite tz = new NetworkLite("Tzone4");
    PortAllocationContext context = new PortAllocationContext(tz, "test");
    StoragePort port;
    port = createFCPort("FA-3E:2", "50:00:00:00:00:01:01:02");
    addPort(context, port, "mds-b");
    port = createFCPort("FA-3E:3", "50:00:00:00:00:01:01:03");
    addPort(context, port, "mds-b");
    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 85 with PortAllocationContext

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

the class StoragePortsAssignerTest method testVMAX2NetAllocAssign.

public static void testVMAX2NetAllocAssign(Map<URI, List<Initiator>> net2InitiatorsMapA, Map<URI, List<Initiator>> net2InitiatorsMapB, Map<URI, List<Initiator>> net2InitiatorsMapC, Map<URI, List<Initiator>> net2InitiatorsMapD, int maxPaths, int minPaths, int pathsPerInitiator, int initiatorsPerPort) throws Exception {
    Map<URI, Map<URI, List<Initiator>>> hostToNetToInitiatorsMap = new HashMap<URI, Map<URI, List<Initiator>>>();
    URI hostA = getHostURI(net2InitiatorsMapA);
    hostToNetToInitiatorsMap.put(hostA, net2InitiatorsMapA);
    if (net2InitiatorsMapB != null) {
        URI hostB = getHostURI(net2InitiatorsMapB);
        hostToNetToInitiatorsMap.put(hostB, net2InitiatorsMapB);
    }
    if (net2InitiatorsMapC != null) {
        URI hostC = getHostURI(net2InitiatorsMapC);
        hostToNetToInitiatorsMap.put(hostC, net2InitiatorsMapC);
    }
    if (net2InitiatorsMapD != null) {
        URI hostD = getHostURI(net2InitiatorsMapD);
        hostToNetToInitiatorsMap.put(hostD, net2InitiatorsMapD);
    }
    PortAllocationContext net1ctx = createVmaxNet1();
    PortAllocationContext net2ctx = createVmaxNet2();
    PortAllocationContext[] contexts = new PortAllocationContext[] { net1ctx, net2ctx };
    testAllocationAssignment(contexts, hostToNetToInitiatorsMap, maxPaths, minPaths, pathsPerInitiator, initiatorsPerPort, "vmax", null);
}
Also used : Initiator(com.emc.storageos.db.client.model.Initiator) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) List(java.util.List) URI(java.net.URI) HashMap(java.util.HashMap) Map(java.util.Map) 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