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

Added a method to ITopologyService to get the blocked ports across all topology instances.

parent 437ccd2c
No related branches found
No related tags found
No related merge requests found
......@@ -174,4 +174,12 @@ public interface ITopologyService extends IFloodlightService {
* 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
* instances.
* @return
*/
public Set<NodePortTuple> getBlockedPorts();
}
......@@ -409,6 +409,25 @@ public class TopologyManager implements
return tunnelLinks.keySet();
}
@Override
public Set<NodePortTuple> getBlockedPorts() {
Set<NodePortTuple> bp;
Set<NodePortTuple> blockedPorts =
new HashSet<NodePortTuple>();
// As we might have two topologies, simply get the union of
// both of them and send it.
bp = currentInstance.getBlockedPorts();
if (bp != null)
blockedPorts.addAll(bp);
bp = currentInstanceWithoutTunnels.getBlockedPorts();
if (bp != null)
blockedPorts.addAll(bp);
return blockedPorts;
}
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
......
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