Fix examples to work with new API (and vice-versa.)

This commit is contained in:
Bob Lantz
2012-03-09 16:06:23 -08:00
parent 8e3699eca6
commit a49c85a610
10 changed files with 78 additions and 51 deletions
+5 -2
View File
@@ -6,14 +6,17 @@ from mininet.node import Host
print "*** Creating nodes"
h1 = Host( 'h1' )
root = Host( 'root', inNamespace=False )
print "*** Creating links"
h1.linkTo( root )
print h1
print "*** Configuring nodes"
h1.setIP( h1.intfs[ 0 ], '10.0.0.1', 8 )
root.setIP( root.intfs[ 0 ], '10.0.0.2', 8 )
h1.setIP( '10.0.0.1', 8 )
root.setIP( '10.0.0.2', 8 )
print "*** Creating banner file"
f = open( '/tmp/%s.banner' % h1.name, 'w' )