Search in sources :

Example 41 with NetworkLite

use of com.emc.storageos.util.NetworkLite in project coprhd-controller by CoprHD.

the class VPlexXtremIOMaskingOrchestratorTest method getNet3Ports.

private static PortAllocationContext getNet3Ports(Map<URI, NetworkLite> networkMap, Map<URI, List<StoragePort>> allocatablePorts) {
    String label = "net3";
    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:fc1", "50:00:00:00:00:00:00:7E:00");
    ports.add(port);
    port = createFCPort("X1-SC2:fc1", "50:00:00:00:00:00:00:8E:00");
    ports.add(port);
    port = createFCPort("X2-SC1:fc1", "50:00:00:00:00:00:00:9E:00");
    ports.add(port);
    port = createFCPort("X2-SC2:fc1", "50:00:00:00:00:00:00:AE: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 42 with NetworkLite

use of com.emc.storageos.util.NetworkLite in project coprhd-controller by CoprHD.

the class VPlexXtremIOMaskingOrchestratorTest method getNetAPorts.

private static PortAllocationContext getNetAPorts(Map<URI, NetworkLite> networkMap, Map<URI, List<StoragePort>> allocatablePorts) {
    String label = "netA";
    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:fc1", "50:00:09:73:00:18:95:19");
    ports.add(port);
    port = createFCPort("X1-SC2:fc1", "50:00:09:73:00:18:95:1C");
    ports.add(port);
    port = createFCPort("X2-SC1:fc1", "50:00:09:73:00:18:95:1D");
    ports.add(port);
    port = createFCPort("X2-SC2:fc1", "50:00:09:73:00:18:95:5C");
    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 43 with NetworkLite

use of com.emc.storageos.util.NetworkLite in project coprhd-controller by CoprHD.

the class VPlexXtremIOMaskingOrchestratorTest method getNet4Ports.

private static PortAllocationContext getNet4Ports(Map<URI, NetworkLite> networkMap, Map<URI, List<StoragePort>> allocatablePorts) {
    String label = "net4";
    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:7F:00");
    ports.add(port);
    port = createFCPort("X1-SC2:fc2", "50:00:00:00:00:00:00:8F:00");
    ports.add(port);
    port = createFCPort("X2-SC1:fc2", "50:00:00:00:00:00:00:9F:00");
    ports.add(port);
    port = createFCPort("X2-SC2:fc2", "50:00:00:00:00:00:00:AF: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 44 with NetworkLite

use of com.emc.storageos.util.NetworkLite 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 45 with NetworkLite

use of com.emc.storageos.util.NetworkLite 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)

Aggregations

NetworkLite (com.emc.storageos.util.NetworkLite)130 StoragePort (com.emc.storageos.db.client.model.StoragePort)110 URI (java.net.URI)86 ArrayList (java.util.ArrayList)85 PortAllocationContext (com.emc.storageos.volumecontroller.placement.StoragePortsAllocator.PortAllocationContext)82 HashMap (java.util.HashMap)48 List (java.util.List)44 StringSetMap (com.emc.storageos.db.client.model.StringSetMap)25 URIQueryResultList (com.emc.storageos.db.client.constraint.URIQueryResultList)22 Map (java.util.Map)22 HashSet (java.util.HashSet)20 Initiator (com.emc.storageos.db.client.model.Initiator)19 StringSet (com.emc.storageos.db.client.model.StringSet)19 TreeMap (java.util.TreeMap)10 Set (java.util.Set)9 SortedMap (java.util.SortedMap)9 StringMap (com.emc.storageos.db.client.model.StringMap)7 StoragePortsAllocator (com.emc.storageos.volumecontroller.placement.StoragePortsAllocator)6 DummyDbClient (com.emc.storageos.util.DummyDbClient)4 PortAllocatorTestContext (com.emc.storageos.volumecontroller.placement.PortAllocatorTestContext)4