Skip to content
Snippets Groups Projects
Commit c2ad8179 authored by Rob Adams's avatar Rob Adams
Browse files

Merge branch 'master' of github.com:bigswitch/bigswitchcontroller into bigsync

parents 8e376f32 bb9d64d4
No related branches found
No related tags found
No related merge requests found
......@@ -11,3 +11,4 @@ thrift
*.swp
*.pyc
findbugs-results
*.launch
......@@ -25,6 +25,36 @@ cat >"$d/.project" <<EOF
</projectDescription>
EOF
cat >"$d/Floodlight-Default-Conf.launch" << EOF
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/floodlight/src/main/java/net/floodlightcontroller/core/Main.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="net.floodlightcontroller.core.Main"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="floodlight"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea"/>
</launchConfiguration>
EOF
cat > "$d/Floodlight-Quantum-Conf.launch" << EOF
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/floodlight/src/main/java/net/floodlightcontroller/core/Main.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="net.floodlightcontroller.core.Main"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-cf src/main/resources/quantum.properties"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="floodlight"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea"/>
</launchConfiguration>
EOF
cat >"$d/.classpath" <<EOF
<?xml version="1.0" encoding="UTF-8"?>
......
......@@ -51,6 +51,12 @@ public interface IDeviceService extends IFloodlightService {
public static final String CONTEXT_DST_DEVICE =
"net.floodlightcontroller.devicemanager.dstDevice";
/**
* The original destination device for the current packet-in
*/
public static final String CONTEXT_ORIG_DST_DEVICE =
"net.floodlightcontroller.devicemanager.origDstDevice";
/**
* A FloodlightContextStore object that can be used to interact with the
* FloodlightContext information created by BVS manager.
......
/**
* Copyright 2011, Big Switch Networks, Inc.
* Copyright 2011, Big Switch Networks, Inc.
* Originally created by David Erickson, Stanford University
*
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
......@@ -29,18 +29,23 @@ public interface IRoutingDecision {
/*
* NONE: NO-OP, continue with the packet processing chain
* DROP: Drop this packet and this flow
* FORWARD: Forward this packet, and this flow, to the first (and only device) in getDestinationDevices(),
* if the destination is not known at this time, initiate a discovery action for it (e.g. ARP)
* FORWARD_OR_FLOOD: Forward this packet, and this flow, to the first (and only device) in getDestinationDevices(),
* if the destination is not known at this time, flood this packet on the source switch
* MULTICAST: Multicast this packet to all the interfaces and devices attached
* FORWARD: Forward this packet, and this flow, to the first
* (and only device) in getDestinationDevices(),
* if the destination is not known at this time,
* initiate a discovery action for it (e.g. ARP)
* FORWARD_OR_FLOOD: Forward this packet, and this flow, to the first
* (and only device) in getDestinationDevices(),
* if the destination is not known at this time,
* flood this packet on the source switch
* MULTICAST: Multicast this packet to all the interfaces
* and devices attached
*/
NONE, DROP, FORWARD, FORWARD_OR_FLOOD, MULTICAST
}
public static final FloodlightContextStore<IRoutingDecision> rtStore =
new FloodlightContextStore<IRoutingDecision>();
public static final String CONTEXT_DECISION =
public static final String CONTEXT_DECISION =
"net.floodlightcontroller.routing.decision";
public void addToContext(FloodlightContext cntx);
......
......@@ -1138,12 +1138,14 @@ public class ControllerTest extends FloodlightTestCase
// Make sure controller attempts to reset switch master
expect(sw.getAttribute("supportsNxRole")).andReturn(true).anyTimes();
expect(sw.getNextTransactionId()).andReturn(0).anyTimes();
sw.write(EasyMock.<List<OFMessage>> anyObject(),
(FloodlightContext)anyObject());
// test
replay(sw, lock);
chdlr.processOFMessage(error);
// Verify there is a pending role change request
assertTrue(controller.roleChanger.pendingTasks.poll() != null);
assertTrue(controller.roleChanger.pendingTasks.peek() != null);
}
// Helper function.
......
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