use of com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext in project coprhd-controller by CoprHD.
the class StoragePortsAllocatorTest method testFC.
protected static void testFC() throws Exception {
PortAllocationContext ctx = createVNX2director4portFC();
StoragePortsAllocator allocator = new StoragePortsAllocator();
if (!vmaxonly && !vplexonly) {
alloc(allocator, 1, ctx, true);
alloc(allocator, 2, ctx, true);
alloc(allocator, 4, ctx, true);
alloc(allocator, 8, ctx, true);
alloc(allocator, 16, ctx, true);
alloc(allocator, 32, ctx, true);
}
if (!vnxonly && !vplexonly) {
ctx = createVMAX3engine4portFC();
allocator = new StoragePortsAllocator();
alloc(allocator, 1, ctx, true);
alloc(allocator, 2, ctx, true);
alloc(allocator, 4, ctx, true);
alloc(allocator, 8, ctx, true);
duplicateCpuExpected = true;
alloc(allocator, 16, ctx, true);
duplicateCpuExpected = true;
alloc(allocator, 32, ctx, true);
alloc(allocator, 4, ctx, true);
Map<String, Integer> switchMap = new HashMap<String, Integer>();
switchMap.put("mds-a", 4);
System.out.println("testing swich affinity");
alloc(allocator, 4, ctx, true, switchMap);
ctx = createVMAXWithCpuDuplication();
allocator = new StoragePortsAllocator();
alloc(allocator, 1, ctx, true);
alloc(allocator, 2, ctx, true);
alloc(allocator, 3, ctx, true);
_log.debug("Cpu duplication forced");
duplicateCpuExpected = true;
alloc(allocator, 4, ctx, true);
}
if (!vnxonly && !vmaxonly) {
ctx = createVplex1engine4portFC();
allocator = new StoragePortsAllocator();
_log.info("Start Vplex 1 engine port allocation");
alloc(allocator, 1, ctx, true);
alloc(allocator, 2, ctx, true);
alloc(allocator, 4, ctx, true);
alloc(allocator, 8, ctx, true);
alloc(allocator, 16, ctx, true);
alloc(allocator, 32, ctx, true);
_log.info("Done with Vplex 1 engine port allocation");
_log.info("Start Vplex 2 engine port allocation");
ctx = createVplex2engine4portFC();
allocator = new StoragePortsAllocator();
alloc(allocator, 1, ctx, true);
alloc(allocator, 2, ctx, true);
alloc(allocator, 4, ctx, true);
alloc(allocator, 8, ctx, true);
alloc(allocator, 16, ctx, true);
alloc(allocator, 32, ctx, true);
_log.info("Done with Vplex 2 engine port allocation");
_log.info("Start Vplex 4 engine port allocation");
ctx = createVplex4engine4portFC();
allocator = new StoragePortsAllocator();
alloc(allocator, 1, ctx, true);
alloc(allocator, 2, ctx, true);
alloc(allocator, 4, ctx, true);
alloc(allocator, 8, ctx, true);
alloc(allocator, 16, ctx, true);
alloc(allocator, 32, ctx, true);
_log.info("Done with Vplex 4 engine port allocation");
runIterations(50, allocator, 4, ctx, true);
System.out.println("Symmetrical two transport zones each with four directors two ports each");
test2tzones(1, createTzone1FC(), createTzone2FC(), true);
test2tzones(2, createTzone1FC(), createTzone2FC(), true);
test2tzones(4, createTzone1FC(), createTzone2FC(), true);
System.out.println("Asymmetrical transport zones, one with two directors, one with one");
test2tzones(1, createTzone3FC(), createTzone4FC(), true);
test2tzones(2, createTzone3FC(), createTzone4FC(), true);
test2tzones(4, createTzone3FC(), createTzone4FC(), true);
}
}
use of com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext in project coprhd-controller by CoprHD.
the class StoragePortsAllocatorTest method createVMAX3engine4portFC.
protected static PortAllocationContext createVMAX3engine4portFC() {
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, null);
port = createFCPort("FA-7E:1", "50:00:00:00:00:00:00:01");
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-7F:3", "50:00:00:00:00:01:00:03");
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");
port = createFCPort("FA-8F:2", "50:00:00:00:00:01:01:02");
addPort(context, port, "mds-b");
port = createFCPort("FA-8F:3", "50:00:00:00:00:01:01:03");
addPort(context, port, "mds-b");
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-9F:2", "50:00:00:00:00:01:02:02");
addPort(context, port, "mds-b");
port = createFCPort("FA-9F:3", "50:00:00:00:00:01:02:03");
addPort(context, port, "mds-b");
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");
port = createFCPort("FA-10F:2", "50:00:00:00:00:01:03:02");
addPort(context, port, "mds-b");
port = createFCPort("FA-10F:3", "50:00:00:00:00:01:03:03");
addPort(context, port, null);
port = createFCPort("FA-11E:0", "50:00:00:00:00:00:04:00");
addPort(context, port, "mds-a");
port = createFCPort("FA-11E:1", "50:00:00:00:00:00:04:01");
addPort(context, port, "mds-a");
port = createFCPort("FA-11F:2", "50:00:00:00:00:01:04:02");
addPort(context, port, "mds-b");
port = createFCPort("FA-11F:3", "50:00:00:00:00:01:04:03");
addPort(context, port, "mds-b");
port = createFCPort("FA-12E:0", "50:00:00:00:00:00:05:00");
addPort(context, port, "mds-a");
port = createFCPort("FA-12E:1", "50:00:00:00:00:00:05:01");
addPort(context, port, "mds-a");
port = createFCPort("FA-12F:2", "50:00:00:00:00:01:05:02");
addPort(context, port, "mds-b");
port = createFCPort("FA-12F:3", "50:00:00:00:00:01:05:03");
addPort(context, port, "mds-b");
return context;
}
use of com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext in project coprhd-controller by CoprHD.
the class StoragePortsAssignerTest method testVMAX4NetAllocAssign.
public static void testVMAX4NetAllocAssign(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 net3ctx = createVmaxNet3();
PortAllocationContext net4ctx = createVmaxNet4();
PortAllocationContext[] contexts = new PortAllocationContext[] { net1ctx, net2ctx, net3ctx, net4ctx };
testAllocationAssignment(contexts, hostToNetToInitiatorsMap, maxPaths, minPaths, pathsPerInitiator, initiatorsPerPort, "vmax", null);
}
use of com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext in project coprhd-controller by CoprHD.
the class StoragePortsAssignerTest method testVMAX2NetAllocAssignWithSwitchAffinity.
public static void testVMAX2NetAllocAssignWithSwitchAffinity(Map<URI, List<Initiator>> net2InitiatorsMapA, Map<URI, List<Initiator>> net2InitiatorsMapB, 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);
}
PortAllocationContext net1ctx = createVmaxNet11();
PortAllocationContext net2ctx = createVmaxNet22();
PortAllocationContext[] contexts = new PortAllocationContext[] { net1ctx, net2ctx };
testAllocationAssignmentWithSwitchAffinity(contexts, hostToNetToInitiatorsMap, maxPaths, minPaths, pathsPerInitiator, initiatorsPerPort, "vmax", null);
}
use of com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext in project coprhd-controller by CoprHD.
the class StoragePortsAssignerTest method createVmaxNet1.
protected static PortAllocationContext createVmaxNet1() {
NetworkLite tz = new NetworkLite(URI.create("net1"), "net1");
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-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-b");
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-b");
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-b");
port = createFCPort("FA-11E:0", "50:00:00:00:00:00:04:00");
addPort(context, port, "mds-a");
port = createFCPort("FA-11E:1", "50:00:00:00:00:00:04:01");
addPort(context, port, "mds-b");
port = createFCPort("FA-12E:0", "50:00:00:00:00:00:05:00");
addPort(context, port, "mds-a");
port = createFCPort("FA-12E:1", "50:00:00:00:00:00:05:01");
addPort(context, port, "mds-b");
return context;
}
Aggregations