Skip to content
Snippets Groups Projects
Commit d863f454 authored by Ryan Izard's avatar Ryan Izard
Browse files

Forgot to fix Hub after playing with it initially. Now defaults to FLOOD...

Forgot to fix Hub after playing with it initially. Now defaults to FLOOD OFPacketOuts at the controller, which means no flows are inserted. The option still exists to insert flows instead.
parent 4a468910
No related branches found
No related tags found
No related merge requests found
......@@ -66,7 +66,7 @@ public class Hub implements IFloodlightModule, IOFMessageListener {
public Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx) {
OFMessage outMessage;
HubType ht = HubType.USE_FLOW_MOD;
HubType ht = HubType.USE_PACKET_OUT;
switch (ht) {
case USE_FLOW_MOD:
outMessage = createHubFlowMod(sw, msg);
......
......@@ -38,6 +38,7 @@ import net.floodlightcontroller.test.FloodlightTestCase;
import org.easymock.Capture;
import org.easymock.CaptureType;
import org.easymock.EasyMock;
import org.junit.Before;
import org.junit.Test;
import org.projectfloodlight.openflow.protocol.OFFactories;
......@@ -105,6 +106,7 @@ public class HubTest extends FloodlightTestCase {
public void testFloodNoBufferId() throws Exception {
// Mock up our expected behavior
IOFSwitch mockSwitch = createMock(IOFSwitch.class);
EasyMock.expect(mockSwitch.getOFFactory()).andReturn(OFFactories.getFactory(OFVersion.OF_13)).anyTimes();
// build our expected flooded packetOut
OFActionOutput ao = OFFactories.getFactory(OFVersion.OF_13).actions().buildOutput().setPort(OFPort.FLOOD).build();
......@@ -160,6 +162,7 @@ public class HubTest extends FloodlightTestCase {
// Mock up our expected behavior
IOFSwitch mockSwitch = createMock(IOFSwitch.class);
EasyMock.expect(mockSwitch.getOFFactory()).andReturn(OFFactories.getFactory(OFVersion.OF_13)).anyTimes();
Capture<OFPacketOut> wc1 = new Capture<OFPacketOut>(CaptureType.ALL);
mockSwitch.write(capture(wc1));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment