Skip to content
Snippets Groups Projects
Commit d3ac2ca7 authored by Gregor Maier's avatar Gregor Maier
Browse files

Merge pull request #206 from maiergre/addrspace

Some small fixes (IndexedEntity, IDevice, tunnelEnabled)
parents e1ac2744 e5ab9412
No related branches found
No related tags found
No related merge requests found
......@@ -19,8 +19,6 @@ package net.floodlightcontroller.devicemanager;
import java.util.Date;
import net.floodlightcontroller.devicemanager.internal.Entity;
/**
* Represents an independent device on the network. A device consists of a
......@@ -89,9 +87,4 @@ public interface IDevice {
*/
public IEntityClass getEntityClass();
/**
* Get the list of entities for this device
* @return
*/
public Entity[] getEntities();
}
......@@ -363,7 +363,6 @@ public class Device implements IDevice {
return entityClass;
}
@Override
public Entity[] getEntities() {
return entities;
}
......
......@@ -104,6 +104,9 @@ public class IndexedEntity {
if (obj == null) return false;
if (getClass() != obj.getClass()) return false;
IndexedEntity other = (IndexedEntity) obj;
if (!keyFields.equals(other.keyFields))
return false;
for (IDeviceService.DeviceField f : keyFields) {
switch (f) {
......
......@@ -173,12 +173,7 @@ public interface ITopologyService extends IFloodlightService {
public Set<NodePortTuple> getBroadcastDomainPorts();
public Set<NodePortTuple> getTunnelPorts();
/**
* Indicates if tunnels are allowed between a given source
* destination pair.
*/
public boolean isTunnelEnabled(long srcMac, long dstMac);
/**
* Returns a set of blocked ports. The set of blocked
* ports is the union of all the blocked ports across all
......
......@@ -624,13 +624,6 @@ public class TopologyManager implements
// ****************
// Internal methods
// ****************
public static boolean isTunnelEnabled(FloodlightContext cntx) {
if (cntx == null) return false;
Boolean flag = (Boolean) cntx.getStorage().get(CONTEXT_TUNNEL_ENABLED);
if (flag == null || flag == false) return false;
return true;
}
protected Command dropFilter(IOFSwitch sw, OFPacketIn pi,
FloodlightContext cntx) {
Command result = Command.CONTINUE;
......@@ -655,13 +648,7 @@ public class TopologyManager implements
return result;
}
protected void checkTunnelUsage(IOFSwitch sw, OFPacketIn pi,
FloodlightContext cntx) {
// tunnels are disabled.
cntx.getStorage().put(CONTEXT_TUNNEL_ENABLED, false);
}
/**
* TODO This method must be moved to a layer below forwarding
* so that anyone can use it.
......@@ -789,7 +776,6 @@ public class TopologyManager implements
} else {
// if the packet is BDDP, then send flood it on all the external
// switch ports in the same openflow domain.
checkTunnelUsage(sw, pi, cntx);
return dropFilter(sw, pi, cntx);
}
return Command.STOP;
......@@ -1054,10 +1040,5 @@ public class TopologyManager implements
public TopologyInstance getCurrentInstance() {
return this.getCurrentInstance(true);
}
@Override
public boolean isTunnelEnabled(long srcMac, long dstMac) {
return false;
}
}
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