Skip to content
Snippets Groups Projects
Commit acff9140 authored by kwanggithub's avatar kwanggithub
Browse files

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

parents c31e2848 a669e856
No related branches found
No related tags found
No related merge requests found
......@@ -277,7 +277,7 @@ IFlowReconcileListener, IInfoProvider, IHAListener {
} else if (oldPort == OFPort.OFPP_LOCAL.getValue() &&
newPort != OFPort.OFPP_LOCAL.getValue()) {
return 1;
}
}
// We expect that the last seen of the new AP is higher than
// old AP, if it is not, just reverse and send the negative
......
......@@ -41,6 +41,10 @@ public interface ITopologyService extends IFloodlightService {
public boolean inSameOpenflowDomain(long switch1, long switch2,
boolean tunnelEnabled);
public Set<Long> getSwitchesInOpenflowDomain(long switchDPID);
public Set<Long> getSwitchesInOpenflowDomain(long switchDPID,
boolean tunnelEnabled);
/**
* Queries whether two switches are in the same island.
* Currently, island and cluster are the same. In future,
......
......@@ -727,7 +727,13 @@ public class TopologyInstance {
protected Set<Long> getSwitchesInOpenflowDomain(long switchId) {
Cluster c = switchClusterMap.get(switchId);
if (c == null) return null;
if (c == null) {
// The switch is not known to topology as there
// are no links connected to it.
Set<Long> nodes = new HashSet<Long>();
nodes.add(switchId);
return nodes;
}
return (c.getNodes());
}
......
......@@ -377,7 +377,8 @@ public class TopologyManager implements
}
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/**
* Checks if the switchport is a broadcast domain port or not.
*/
......@@ -393,7 +394,8 @@ public class TopologyManager implements
return ti.isBroadcastDomainPort(new NodePortTuple(sw, port));
}
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/**
* Checks if the new attachment point port is consistent with the
* old attachment point port.
......@@ -467,6 +469,22 @@ public class TopologyManager implements
return ti.getAllowedIncomingBroadcastPort(src,srcPort);
}
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
@Override
public Set<Long> getSwitchesInOpenflowDomain(long switchDPID) {
return getSwitchesInOpenflowDomain(switchDPID, true);
}
@Override
public Set<Long> getSwitchesInOpenflowDomain(long switchDPID,
boolean tunnelEnabled) {
TopologyInstance ti = getCurrentInstance(tunnelEnabled);
return ti.getSwitchesInOpenflowDomain(switchDPID);
}
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
@Override
public Set<NodePortTuple> getBroadcastDomainPorts() {
return portBroadcastDomainLinks.keySet();
......
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