Use print function

This commit is contained in:
Brad Walker
2016-06-21 16:27:04 -07:00
committed by Bob Lantz
parent 57abd9baef
commit 70fcc45893
25 changed files with 189 additions and 141 deletions
+7 -5
View File
@@ -2,6 +2,8 @@
"Create a 64-node tree network, and test connectivity using ping."
from __future__ import print_function
from mininet.log import setLogLevel
from mininet.node import UserSwitch, OVSKernelSwitch # , KernelSwitch
from mininet.topolib import TreeNet
@@ -15,17 +17,17 @@ def treePing64():
'Open vSwitch kernel': OVSKernelSwitch }
for name in switches:
print "*** Testing", name, "datapath"
print( "*** Testing", name, "datapath" )
switch = switches[ name ]
network = TreeNet( depth=2, fanout=8, switch=switch )
result = network.run( network.pingAll )
results[ name ] = result
print
print "*** Tree network ping results:"
print()
print( "*** Tree network ping results:" )
for name in switches:
print "%s: %d%% packet loss" % ( name, results[ name ] )
print
print( "%s: %d%% packet loss" % ( name, results[ name ] ) )
print()
if __name__ == '__main__':
setLogLevel( 'info' )