Package net.floodlightcontroller.topology

Examples of net.floodlightcontroller.topology.NodePortTuple


        for(long sw: switches) {
            Set<Short> ports = topology.getPorts(sw);
            if (ports == null) continue;
            for(short p: ports) {
                result.add(new NodePortTuple(sw, p));
            }
        }
        return result;
    }
View Full Code Here


        assertNotSame(r1, r2);
        assertNotSame(r1.getId(), r2.getId());

        r1 = new Route(1L, 3L);
        r1.getPath().add(new NodePortTuple(1L, (short)1));
        r1.getPath().add(new NodePortTuple(2L, (short)1));
        r1.getPath().add(new NodePortTuple(2L, (short)2));
        r1.getPath().add(new NodePortTuple(3L, (short)1));

        r2.getPath().add(new NodePortTuple(1L, (short)1));
        r2.getPath().add(new NodePortTuple(2L, (short)1));
        r2.getPath().add(new NodePortTuple(2L, (short)2));
        r2.getPath().add(new NodePortTuple(3L, (short)1));

        assertEquals(r1, r2);

        NodePortTuple temp = r2.getPath().remove(0);
        assertNotSame(r1, r2);

        r2.getPath().add(0, temp);
        assertEquals(r1, r2);

        r2.getPath().remove(1);
        temp = new NodePortTuple(2L, (short)5);
        r2.getPath().add(1, temp);
        assertNotSame(r1, r2);
    }
View Full Code Here

                new Capture<FloodlightContext>(CaptureType.ALL);


        Route route = new Route(1L, 2L);
        List<NodePortTuple> nptList = new ArrayList<NodePortTuple>();
        nptList.add(new NodePortTuple(1L, (short)1));
        nptList.add(new NodePortTuple(1L, (short)3));
        nptList.add(new NodePortTuple(2L, (short)1));
        nptList.add(new NodePortTuple(2L, (short)3));
        route.setPath(nptList);
        expect(routingEngine.getRoute(1L, (short)1, 2L, (short)3, 0)).andReturn(route).atLeastOnce();

        // Expected Flow-mods
        OFMatch match = new OFMatch();
View Full Code Here

    @Test
    public void testForwardSingleSwitchPath() throws Exception {
        learnDevices(DestDeviceToLearn.DEVICE2);

        Route route = new  Route(1L, 1L);
        route.getPath().add(new NodePortTuple(1L, (short)1));
        route.getPath().add(new NodePortTuple(1L, (short)3));
        expect(routingEngine.getRoute(1L, (short)1, 1L, (short)3, 0)).andReturn(route).atLeastOnce();

        // Expected Flow-mods
        OFMatch match = new OFMatch();
        match.loadFromPacket(testPacketSerialized, (short) 1);
View Full Code Here

        expect(topology.getL2DomainId(1L)).andReturn(1L).anyTimes();
        replay(topology);


        Route route = new  Route(1L, 1L);
        route.getPath().add(new NodePortTuple(1L, (short)1));
        route.getPath().add(new NodePortTuple(1L, (short)3));
        expect(routingEngine.getRoute(1L, (short)1, 1L, (short)3, 0)).andReturn(route).atLeastOnce();

        // Expected Flow-mods
        OFMatch match = new OFMatch();
        match.loadFromPacket(testPacketSerialized, (short) 1);
View Full Code Here

    }

    protected void
    verifyExpectedBroadcastPortsInClusters(int [][][] ebp,
                                           boolean tunnelsEnabled) {
        NodePortTuple npt = null;
        Set<NodePortTuple> expected = new HashSet<NodePortTuple>();
        for(int i=0; i<ebp.length; ++i) {
            int [][] nptList = ebp[i];
            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);
View Full Code Here

     * Add a switch port to the suppressed LLDP list. Remove any known links on
     * the switch port.
     */
    @Override
    public void AddToSuppressLLDPs(long sw, short port) {
        NodePortTuple npt = new NodePortTuple(sw, port);
        this.suppressLinkDiscovery.add(npt);
        deleteLinksOnPort(npt, "LLDP suppressed.");
    }
View Full Code Here

     * Remove a switch port from the suppressed LLDP list. Discover links on
     * that switchport.
     */
    @Override
    public void RemoveFromSuppressLLDPs(long sw, short port) {
        NodePortTuple npt = new NodePortTuple(sw, port);
        this.suppressLinkDiscovery.remove(npt);
        discover(npt);
    }
View Full Code Here

    public Set<Short> getQuarantinedPorts(long sw) {
        Set<Short> qPorts = new HashSet<Short>();

        Iterator<NodePortTuple> iter = quarantineQueue.iterator();
        while (iter.hasNext()) {
            NodePortTuple npt = iter.next();
            if (npt.getNodeId() == sw) {
                qPorts.add(npt.getPortId());
            }
        }
        return qPorts;
    }
View Full Code Here

            ctrIgnoreSrcMacDrops.updateCounterNoFlush();
            return Command.STOP;
        }

        // If packet-in is from a quarantine port, stop processing.
        NodePortTuple npt = new NodePortTuple(sw, pi.getInPort());
        if (quarantineQueue.contains(npt)) {
            ctrQuarantineDrops.updateCounterNoFlush();
            return Command.STOP;
        }
View Full Code Here

TOP

Related Classes of net.floodlightcontroller.topology.NodePortTuple

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.