Skip to content
Snippets Groups Projects
Commit aef26f36 authored by Srinivasan Ramasubramanian's avatar Srinivasan Ramasubramanian
Browse files

DeviceManager update to take into account that previous attachment belongs to...

DeviceManager update to take into account that previous attachment belongs to non-broadcast domain attachment point.
Adding an interface to ITopologyService that indicates if tunnels are enabled for traffic between two hosts.
parent 8631b459
No related branches found
No related tags found
No related merge requests found
......@@ -262,8 +262,8 @@ public class Device implements IDevice {
!deviceManager.isValidAttachmentPoint(dpid, port) ||
///*||
(prev != null &&
//topology.isBroadcastDomainPort(prev.getSwitchDPID().longValue(),
// prev.getSwitchPort().shortValue()) == false &&
topology.isBroadcastDomainPort(prev.getSwitchDPID().longValue(),
prev.getSwitchPort().shortValue()) == false &&
topology.isBroadcastDomainPort(dpid.longValue(), port.shortValue()) &&
topology.isConsistent(prev.getSwitchDPID().longValue(),
prev.getSwitchPort().shortValue(),
......
......@@ -168,4 +168,10 @@ 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);
}
......@@ -1005,5 +1005,10 @@ public class TopologyManager implements
public TopologyInstance getCurrentInstance() {
return this.getCurrentInstance(true);
}
@Override
public boolean isTunnelEnabled(long srcMac, long dstMac) {
return false;
}
}
......@@ -505,6 +505,7 @@ public class DeviceManagerImplTest extends FloodlightTestCase {
1L, (short)2)).andReturn(true).anyTimes();
expect(mockTopology.isInSameBroadcastDomain(1L, (short)2,
1L, (short)1)).andReturn(true).anyTimes();
expect(mockTopology.isConsistent(anyLong(), anyShort(), anyLong(), anyShort())).andReturn(false).anyTimes();
replay(mockTopology);
......
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