Search in sources :

Example 61 with PortAllocationContext

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

the class VPlexVmaxMaskingOrchestratorTest method getNet5Ports.

private static PortAllocationContext getNet5Ports(Map<URI, NetworkLite> networkMap, Map<URI, List<StoragePort>> allocatablePorts) {
    String label = "net5";
    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-6E:0", "50:00:00:00:00:00:00:6E:00");
    ports.add(port);
    port = createFCPort("FA-7E:0", "50:00:00:00:00:00:00:7E:00");
    ports.add(port);
    port = createFCPort("FA-8E:0", "50:00:00:00:00:00:00:8E:00");
    ports.add(port);
    port = createFCPort("FA-9E:0", "50:00:00:00:00:00:00:9E:00");
    ports.add(port);
    port = createFCPort("FA-10E:0", "50:00:00:00:00:00:00:AE:00");
    ports.add(port);
    port = createFCPort("FA-11E:0", "50:00:00:00:00:00:00:BE:00");
    ports.add(port);
    port = createFCPort("FA-6G:0", "50:00:00:00:00:00:00:61:00");
    ports.add(port);
    port = createFCPort("FA-7G:0", "50:00:00:00:00:00:00:71:00");
    ports.add(port);
    port = createFCPort("FA-8G:0", "50:00:00:00:00:00:00:81:00");
    ports.add(port);
    port = createFCPort("FA-9G:0", "50:00:00:00:00:00:00:91:00");
    ports.add(port);
    port = createFCPort("FA-10G:0", "50:00:00:00:00:00:00:A1:00");
    ports.add(port);
    port = createFCPort("FA-11G:0", "50:00:00:00:00:00:00:B1: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 62 with PortAllocationContext

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

the class VPlexVmaxMaskingOrchestratorTest method getNet7Ports.

private static PortAllocationContext getNet7Ports(Map<URI, NetworkLite> networkMap, Map<URI, List<StoragePort>> allocatablePorts) {
    String label = "net7";
    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-1E:0", "50:00:00:00:00:00:00:1E:00");
    ports.add(port);
    port = createFCPort("FA-2E:0", "50:00:00:00:00:00:00:2E:00");
    ports.add(port);
    port = createFCPort("FA-3E:0", "50:00:00:00:00:00:00:3E:00");
    ports.add(port);
    port = createFCPort("FA-4E:0", "50:00:00:00:00:00:00:4E:00");
    ports.add(port);
    port = createFCPort("FA-5E:0", "50:00:00:00:00:00:00:5E:00");
    ports.add(port);
    port = createFCPort("FA-6E:0", "50:00:00:00:00:00:00:6E:00");
    ports.add(port);
    port = createFCPort("FA-7E:0", "50:00:00:00:00:00:00:7E:00");
    ports.add(port);
    port = createFCPort("FA-8E:0", "50:00:00:00:00:00:00:8E:00");
    ports.add(port);
    port = createFCPort("FA-9E:0", "50:00:00:00:00:00:00:9E:00");
    ports.add(port);
    port = createFCPort("FA-10E:0", "50:00:00:00:00:00:00:AE:00");
    ports.add(port);
    port = createFCPort("FA-11E:0", "50:00:00:00:00:00:00:BE:00");
    ports.add(port);
    port = createFCPort("FA-1G:0", "50:00:00:00:00:00:00:21:00");
    ports.add(port);
    port = createFCPort("FA-2G:0", "50:00:00:00:00:00:00:31:00");
    ports.add(port);
    port = createFCPort("FA-3G:0", "50:00:00:00:00:00:00:41:00");
    ports.add(port);
    port = createFCPort("FA-4G:0", "50:00:00:00:00:00:00:51:00");
    ports.add(port);
    port = createFCPort("FA-5G:0", "50:00:00:00:00:00:00:61:00");
    ports.add(port);
    port = createFCPort("FA-6G:0", "50:00:00:00:00:00:00:61:00");
    ports.add(port);
    port = createFCPort("FA-7G:0", "50:00:00:00:00:00:00:71:00");
    ports.add(port);
    port = createFCPort("FA-8G:0", "50:00:00:00:00:00:00:81:00");
    ports.add(port);
    port = createFCPort("FA-9G:0", "50:00:00:00:00:00:00:91:00");
    ports.add(port);
    port = createFCPort("FA-10G:0", "50:00:00:00:00:00:00:A1:00");
    ports.add(port);
    port = createFCPort("FA-11G:0", "50:00:00:00:00:00:00:B1: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 63 with PortAllocationContext

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

the class VPlexVmaxMaskingOrchestratorTest method getNet573APorts.

private static PortAllocationContext getNet573APorts(Map<URI, NetworkLite> networkMap, Map<URI, List<StoragePort>> allocatablePorts) {
    String label = "net573A";
    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:1", "50:00:09:73:00:18:95:19");
    ports.add(port);
    port = createFCPort("FA-8E:0", "50:00:09:73:00:18:95:1C");
    ports.add(port);
    port = createFCPort("FA-8E:1", "50:00:09:73:00:18:95:1D");
    ports.add(port);
    port = createFCPort("FA-8F:0", "50:00:09:73:00:18:95:5C");
    ports.add(port);
    port = createFCPort("FA-8F:1", "50:00:09:73:00:18:95:5D");
    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 64 with PortAllocationContext

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

the class VPlexVnxMaskingOrchestratorTest 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("SP_A:2", "50:00:00:00:00:00:00:AE:00");
    addPort(context, port, "mds-b");
    ports.add(port);
    port = createFCPort("SP_B:2", "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)

Example 65 with PortAllocationContext

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

the class VPlexVnxMaskingOrchestratorTest method getNet2Ports.

private static PortAllocationContext getNet2Ports(Map<URI, NetworkLite> networkMap, Map<URI, List<StoragePort>> allocatablePorts) {
    String label = "net2";
    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("SP_A:2", "50:00:00:00:00:00:00:AE:00");
    addPort(context, port, null);
    ports.add(port);
    port = createFCPort("SP_B:2", "50:00:00:00:00:00:00:AF: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)

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