Skip to content
Snippets Groups Projects
Commit f78ed552 authored by Kanzhe Jiang's avatar Kanzhe Jiang
Browse files

merge conflict

parent df0f29f3
No related branches found
No related tags found
No related merge requests found
......@@ -141,8 +141,6 @@ public interface IFloodlightProviderService extends
*/
public Map<Long,IOFSwitch> getAllSwitchMap();
public IOFSwitch getSwitchByDpid(String dpid);
/**
* Get the current role of the controller
*/
......
......@@ -1580,25 +1580,6 @@ public class Controller implements IFloodlightProviderService,
messageListeners.remove(type);
}
@Override
@Override
public IOFSwitch getSwitchByDpid(String dpid) {
Map<Long, IOFSwitch> switches = getSwitches();
if (switches == null) return null;
Long switchid = HexString.toLong(dpid);
if (switchid != null && switches.containsKey(switchid)) {
return switches.get(switchid);
}
// TODO: This is a hack for the demo, which only has one switch
for (IOFSwitch sw : switches.values()) {
return sw;
}
return null;
}
@Override
public Map<OFType, List<IOFMessageListener>> getListeners() {
Map<OFType, List<IOFMessageListener>> lers =
......
......@@ -55,7 +55,6 @@ import org.openflow.protocol.OFMessage;
import org.openflow.protocol.OFPacketIn;
import org.openflow.protocol.OFType;
import org.openflow.protocol.factory.BasicFactory;
import org.openflow.util.HexString;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -143,19 +142,6 @@ public class MockFloodlightProvider implements IFloodlightModule, IFloodlightPro
return this.switches.get(dpid);
}
@Override
public IOFSwitch getSwitchByDpid(String dpid) {
Map<Long, IOFSwitch> switches = getSwitches();
if (switches == null) return null;
Long switchid = HexString.toLong(dpid);
if (switchid != null && switches.containsKey(switchid)) {
return switches.get(switchid);
}
return null;
}
public void setSwitches(Map<Long, IOFSwitch> switches) {
this.switches = switches;
}
......
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