Package net.floodlightcontroller.topology

Examples of net.floodlightcontroller.topology.TopologyInstance$PathCacheLoader


        // Make sure the expected cluster arrays are sorted so we can
        // use binarySearch to test for membership
        for (int i = 0; i < clusters.length; i++)
            Arrays.sort(clusters[i]);

        TopologyInstance ti =
                topologyManager.getCurrentInstance(tunnelsEnabled);
        Set<Long> switches = ti.getSwitches();

        for (long sw: switches) {
            if (!verifiedSwitches.contains(sw)) {

                int[] expectedCluster = null;

                for (int j = 0; j < clusters.length; j++) {
                    if (Arrays.binarySearch(clusters[j], (int) sw) >= 0) {
                        expectedCluster = clusters[j];
                        break;
                    }
                }
                if (expectedCluster != null) {
                    Set<Long> cluster = ti.getSwitchesInOpenflowDomain(sw);
                    assertEquals(expectedCluster.length, cluster.size());
                    for (long sw2: cluster) {
                        assertTrue(Arrays.binarySearch(expectedCluster, (int)sw2) >= 0);
                        verifiedSwitches.add(sw2);
                    }
View Full Code Here


            expected.clear();
            for(int j=0; j<nptList.length; ++j) {
                npt = new NodePortTuple((long)nptList[j][0], (short)nptList[j][1]);
                expected.add(npt);
            }
            TopologyInstance ti = topologyManager.getCurrentInstance(tunnelsEnabled);
            Set<NodePortTuple> computed = ti.getBroadcastNodePortsInCluster(npt.nodeId);
            log.info("computed: {}", computed);
            if (computed != null)
                assertTrue(computed.equals(expected));
            else if (computed == null)
                assertTrue(expected.isEmpty());
View Full Code Here

TOP

Related Classes of net.floodlightcontroller.topology.TopologyInstance$PathCacheLoader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.