Replaced example topologies __init__ with build

This commit is contained in:
None
2019-01-17 12:01:09 -08:00
parent cf6da391fa
commit fdc3156a91
5 changed files with 5 additions and 17 deletions
+1 -5
View File
@@ -38,11 +38,7 @@ flush = sys.stdout.flush
class LinearTestTopo( Topo ):
"Topology for a string of N hosts and N-1 switches."
def __init__( self, N, **params ):
# Initialize topology
Topo.__init__( self, **params )
def build( self, N, **params ):
# Create switches and hosts
hosts = [ self.addHost( 'h%s' % h )
for h in irange( 1, N ) ]