Moved TreeNet() convenience function here.

This commit is contained in:
Bob Lantz
2010-04-10 19:23:23 -07:00
parent ce67093a62
commit 8bbd368576
+6
View File
@@ -1,6 +1,7 @@
"Library of potentially useful topologies for Mininet"
from mininet.topo import Topo, Node
from mininet.net import Mininet
class TreeTopo( Topo ):
"Topology for a tree network with a given depth and fanout."
@@ -37,3 +38,8 @@ class TreeTopo( Topo ):
return num
# pylint: enable-msg=W0612
def TreeNet( depth=1, fanout=2, **kwargs ):
"Convenience function for creating tree networks."
topo = TreeTopo( depth, fanout )
return Mininet( topo, **kwargs )