Working on examples.

Added new example to create xterms.
Other minor changes.
This commit is contained in:
Bob Lantz
2009-12-10 23:39:06 -08:00
parent 4ccc7ee941
commit 748e35d50f
6 changed files with 117 additions and 43 deletions
+6 -7
View File
@@ -1,22 +1,21 @@
#!/usr/bin/python
"""Create a tree network of depth 4 and fanout 2, and
test connectivity using pingTest."""
from mininet import init, TreeNet, iperfTest
def bigTreePing64():
"""Create a tree network of depth 4 and fanout 2, and
test connectivity using pingTest."""
results = {}
print "*** Testing Mininet with kernel and user datapath"
for datapath in [ 'kernel', 'user' ]:
k = datapath == 'kernel'
results[ datapath ] = []
for switchCount in range( 1, 4 ):
print "*** Creating Linear Network of size", switchCount
network = TreeNet( depth=4, fanout=2, kernel=k )
testResult = network.run( iperfTest )
network = TreeNet( depth=4, fanout=4, kernel=k )
testResult = network.run( pingTest )
results[ datapath ] += testResult
print "*** Test results:", results