Thomas Vachuska

Fixing tree topology simulator to chose proper edge-ports for host attachment.

Change-Id: I9ab9a26dbe1491068e61df611edb6e41302afa5b
......@@ -387,7 +387,7 @@ public abstract class TopologySimulator {
*/
protected List<PortDescription> buildPorts(int portCount) {
List<PortDescription> ports = Lists.newArrayList();
for (int i = 0; i < portCount; i++) {
for (int i = 1; i <= portCount; i++) {
ports.add(new DefaultPortDescription(PortNumber.portNumber(i), true,
Port.Type.COPPER, 0));
}
......
......@@ -55,7 +55,6 @@ public class TreeTopologySimulator extends TopologySimulator {
@Override
protected void createLinks() {
int portOffset = 1;
for (int t = 1; t < tierOffset.length; t++) {
int child = tierOffset[t];
......@@ -72,7 +71,7 @@ public class TreeTopologySimulator extends TopologySimulator {
@Override
protected void createHosts() {
for (int i = tierOffset[tierOffset.length - 1]; i < deviceCount; i++) {
createHosts(deviceIds.get(i), hostCount);
createHosts(deviceIds.get(i), 2);
}
}
}
......