Search in sources :

Example 76 with PortAllocationContext

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

the class StoragePortsAllocatorTest method createVplex2engine4portFC.

protected static PortAllocationContext createVplex2engine4portFC() {
    NetworkLite tz = new NetworkLite("TzoneVplexFC2");
    PortAllocationContext context = new PortAllocationContext(tz, "test");
    StoragePort port;
    // Cluster 1 Engine 1 - Ports
    port = createVplexFCPort("A0-FC00", "50:00:14:42:60:01:01:00", "director-1-1-A");
    addPort(context, port, "mds-a");
    port = createVplexFCPort("A0-FC01", "50:00:14:42:60:01:01:01", "director-1-1-A");
    addPort(context, port, "mds-b");
    port = createVplexFCPort("A0-FC03", "50:00:14:42:60:01:01:03", "director-1-1-A");
    addPort(context, port, "mds-a");
    port = createVplexFCPort("A0-FC04", "50:00:14:42:60:01:01:04", "director-1-1-A");
    addPort(context, port, "mds-b");
    port = createVplexFCPort("B0-FC00", "50:00:14:42:70:01:01:00", "director-1-1-B");
    addPort(context, port, "mds-a");
    port = createVplexFCPort("B0-FC01", "50:00:14:42:70:01:01:01", "director-1-1-B");
    addPort(context, port, "mds-b");
    port = createVplexFCPort("B0-FC03", "50:00:14:42:70:01:01:03", "director-1-1-B");
    addPort(context, port, "mds-a");
    port = createVplexFCPort("B0-FC04", "50:00:14:42:70:01:01:04", "director-1-1-B");
    addPort(context, port, "mds-b");
    // Cluster 2 Engine 1 - Ports
    port = createVplexFCPort("A0-FC00", "50:00:14:42:60:02:01:00", "director-2-1-A");
    addPort(context, port, "mds-a");
    port = createVplexFCPort("A0-FC01", "50:00:14:42:60:02:01:01", "director-2-1-A");
    addPort(context, port, "mds-b");
    port = createVplexFCPort("A0-FC03", "50:00:14:42:60:02:01:03", "director-2-1-A");
    addPort(context, port, "mds-a");
    port = createVplexFCPort("A0-FC04", "50:00:14:42:60:02:01:04", "director-2-1-A");
    addPort(context, port, "mds-b");
    port = createVplexFCPort("B0-FC00", "50:00:14:42:70:02:01:00", "director-2-1-B");
    addPort(context, port, "mds-a");
    port = createVplexFCPort("B0-FC01", "50:00:14:42:70:02:01:01", "director-2-1-B");
    addPort(context, port, "mds-b");
    port = createVplexFCPort("B0-FC03", "50:00:14:42:70:02:01:03", "director-2-1-B");
    addPort(context, port, "mds-a");
    port = createVplexFCPort("B0-FC04", "50:00:14:42:70:02:01:04", "director-2-1-B");
    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 77 with PortAllocationContext

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

the class StoragePortsAllocatorTest method createTzone4IP.

protected static PortAllocationContext createTzone4IP() {
    NetworkLite tz = new NetworkLite("TzoneIP4");
    PortAllocationContext context = new PortAllocationContext(tz, "test");
    StoragePort port;
    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);
    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 78 with PortAllocationContext

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

the class StoragePortsAllocatorTest method createTzone1FC.

protected static PortAllocationContext createTzone1FC() {
    NetworkLite tz = new NetworkLite("Tzone1");
    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-7E:1", "50:00:00:00:00:00:00:01");
    addPort(context, port, "mds-a");
    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");
    port = createFCPort("FA-9E:0", "50:00:00:00:00:00:02:00");
    addPort(context, port, "mds-a");
    port = createFCPort("FA-9E:1", "50:00:00:00:00:00:02:01");
    addPort(context, port, "mds-a");
    port = createFCPort("FA-10E:0", "50:00:00:00:00:00:03:00");
    addPort(context, port, "mds-a");
    port = createFCPort("FA-10E:1", "50:00:00:00:00:00:03: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 79 with PortAllocationContext

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

the class StoragePortsAllocatorTest method main.

public static void main(String[] args) throws Exception {
    for (String arg : args) {
        if (arg.equals("vmaxonly")) {
            vmaxonly = true;
        }
        if (arg.equals("vnxonly")) {
            vnxonly = true;
        }
        if (arg.equals("vplexonly")) {
            vplexonly = true;
        }
    }
    VdcUtil.setDbClient(new DummyDbClient());
    PropertyConfigurator.configure("log4j.properties");
    _log.info("Beginning logging");
    testFC();
    testIP();
    System.out.println("Empty transport zone, should throw PlacementException");
    PortAllocationContext ctx = createEmptyTzone();
    StoragePortsAllocator allocator = new StoragePortsAllocator();
    try {
        alloc(allocator, 1, ctx, true);
    } catch (PlacementException ex) {
        System.out.println("caught PlacementException: " + ex.toString());
    }
    System.out.println("done");
    _log.info(pass ? "PASSED" : "FAILED");
}
Also used : DummyDbClient(com.emc.storageos.util.DummyDbClient) PortAllocationContext(com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext)

Example 80 with PortAllocationContext

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

the class StoragePortsAllocatorTest method createVNX2director4portFC.

protected static PortAllocationContext createVNX2director4portFC() {
    NetworkLite tz = new NetworkLite("Tzon3d4p1");
    PortAllocationContext context = new PortAllocationContext(tz, "test");
    StoragePort port;
    port = createFCPort("SP_A:0", "50:00:00:00:00:00:00:00");
    addPort(context, port, null);
    port = createFCPort("SP_A:1", "50:00:00:00:00:00:00:01");
    addPort(context, port, "mds-a");
    port = createFCPort("SP_A:2", "50:00:00:00:00:01:00:02");
    addPort(context, port, "mds-b");
    port = createFCPort("SP_A:3", "50:00:00:00:00:01:00:03");
    addPort(context, port, "mds-b");
    port = createFCPort("SP_B:0", "50:00:00:00:00:00:01:00");
    addPort(context, port, "mds-a");
    port = createFCPort("SP_B:1", "50:00:00:00:00:00:01:01");
    addPort(context, port, "mds-a");
    port = createFCPort("SP_B:2", "50:00:00:00:00:01:01:02");
    addPort(context, port, "mds-b");
    port = createFCPort("SP_B:3", "50:00:00:00:00:01:01:03");
    addPort(context, port, "mds-b");
    port = createFCPort("SP_C:0", "50:00:00:00:00:00:02:00");
    addPort(context, port, "mds-a");
    port = createFCPort("SP_C:1", "50:00:00:00:00:00:02:01");
    addPort(context, port, "mds-a");
    port = createFCPort("SP_C:2", "50:00:00:00:00:01:02:02");
    addPort(context, port, "mds-b");
    port = createFCPort("SP_C:3", "50:00:00:00:00:01:02:03");
    addPort(context, port, "mds-b");
    port = createFCPort("SP_D:0", "50:00:00:00:00:00:03:00");
    addPort(context, port, "mds-a");
    port = createFCPort("SP_D:1", "50:00:00:00:00:00:03:01");
    addPort(context, port, "mds-a");
    port = createFCPort("SP_D:2", "50:00:00:00:00:01:03:02");
    addPort(context, port, "mds-b");
    port = createFCPort("SP_D:3", "50:00:00:00:00:01:03:03");
    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)

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