Commit 7f3108c3 authored by Christoph Storm's avatar Christoph Storm
Browse files

fix for graph generation

parent 87f211cd
...@@ -519,6 +519,11 @@ public class DefaultTopologyComponent implements TopologyComponent { ...@@ -519,6 +519,11 @@ public class DefaultTopologyComponent implements TopologyComponent {
if (isDistanceBased) { if (isDistanceBased) {
// Build neighbors solely based on an assumed range // Build neighbors solely based on an assumed range
for (MacLayer mac : topoView.getAllMacs()) { for (MacLayer mac : topoView.getAllMacs()) {
//Fix Christoph Storm:
// Do not take offline nodes into account, unless told to do so...
if(onlyOnline && !currentView.containsNode(mac.getHost().getId())){
continue;
}
// Consider all nodes as potential neighbors // Consider all nodes as potential neighbors
for (MacLayer neighborMac : topoView.getAllMacs()) { for (MacLayer neighborMac : topoView.getAllMacs()) {
// create, but do NOT add the node object // create, but do NOT add the node object
...@@ -541,6 +546,11 @@ public class DefaultTopologyComponent implements TopologyComponent { ...@@ -541,6 +546,11 @@ public class DefaultTopologyComponent implements TopologyComponent {
} else { } else {
// Build neighborhoods based on underlay neighbors (1-hop) // Build neighborhoods based on underlay neighbors (1-hop)
for (MacLayer mac : topoView.getAllMacs()) { for (MacLayer mac : topoView.getAllMacs()) {
// Fix Christoph Storm:
// Do not take offline nodes into account, unless told to do so...
if(onlyOnline && !currentView.containsNode(mac.getHost().getId())){
continue;
}
// Rely on underlay for neighbors // Rely on underlay for neighbors
List<MacAddress> neighbors = topoView List<MacAddress> neighbors = topoView
.getNeighbors(mac.getMacAddress()); .getNeighbors(mac.getMacAddress());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment