Skip to content
Snippets Groups Projects
Commit 56278434 authored by Bob Lantz's avatar Bob Lantz
Browse files

Changed to use library TreeNet() and remove unnecessary init().

parent 4a67fc9a
No related branches found
No related tags found
No related merge requests found
......@@ -9,18 +9,11 @@
from mininet.cli import CLI
from mininet.log import setLogLevel
from mininet.net import init, Mininet
from mininet.node import KernelSwitch
from mininet.topolib import TreeTopo
def TreeNet( depth=1, fanout=2, **kwargs ):
"Convenience function for creating tree networks."
topo = TreeTopo( depth, fanout )
return Mininet( topo, **kwargs )
from mininet.topolib import TreeNet
if __name__ == '__main__':
setLogLevel( 'info' )
init()
KernelSwitch.setup()
network = TreeNet( depth=2, fanout=32, switch=KernelSwitch )
network.run( CLI, network )
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