rename Topo() methods for consistency: add_node() -> addNode()

This commit is contained in:
Bob Lantz
2012-08-16 18:48:41 -07:00
parent 01e0758e5d
commit ce15c4f67d
5 changed files with 39 additions and 39 deletions
+3 -3
View File
@@ -19,13 +19,13 @@ class TreeTopo( Topo ):
returns: last node added"""
isSwitch = depth > 0
if isSwitch:
node = self.add_switch( 's%s' % self.switchNum )
node = self.addSwitch( 's%s' % self.switchNum )
self.switchNum += 1
for _ in range( fanout ):
child = self.addTree( depth - 1, fanout )
self.add_link( node, child )
self.addLink( node, child )
else:
node = self.add_host( 'h%s' % self.hostNum )
node = self.addHost( 'h%s' % self.hostNum )
self.hostNum += 1
return node