Pass code check.

This commit is contained in:
Bob Lantz
2010-03-24 17:08:25 -07:00
parent 45e82d0952
commit 41badb9686
3 changed files with 13 additions and 12 deletions
+9 -8
View File
@@ -1,8 +1,7 @@
#!/usr/bin/python
"Create a 64-node tree network, and test connectivity using ping."
from mininet.cli import CLI
from mininet.log import setLogLevel
from mininet.net import init, Mininet
from mininet.node import KernelSwitch, UserSwitch, OVSKernelSwitch
@@ -12,8 +11,10 @@ def TreeNet( depth=1, fanout=2, **kwargs ):
"Convenience function for creating tree networks."
topo = TreeTopo( depth, fanout )
return Mininet( topo, **kwargs )
def treePing64():
"Run ping test on 64-node tree networks."
results = {}
switches = { 'reference kernel': KernelSwitch,
'reference user': UserSwitch,
@@ -26,13 +27,13 @@ def treePing64():
result = network.run( network.pingAll )
results[ name ] = result
print
print
print "*** Tree network ping results:"
for name in switches.keys():
print "%s: %d%% packet loss" % ( name, results[ name ] )
print
if __name__ == '__main__':
setLogLevel( 'info' )
init()
treePing64()
setLogLevel( 'info' )
init()
treePing64()