Changed mininet.link() to mininet.configLinkStatus(src,dst,status)

Also rearranged parameters in link command to

mininet> link s1 h2 up

To resemble ifconfig a bit more.
This commit is contained in:
Bob Lantz
2010-03-23 15:25:12 -07:00
parent fb2f652319
commit c70aab0a38
2 changed files with 10 additions and 10 deletions
+5 -5
View File
@@ -148,14 +148,14 @@ class CLI( Cmd ):
output( '%s\n' % node )
def do_link( self, args ):
"Bring a link up or down."
"Bring link(s) between two nodes up or down."
args = args.split()
if len(args) != 3:
error( 'invalid number of args: link [up down] end1 end2\n' )
elif args[ 0 ] not in [ 'up', 'down' ]:
error( 'invalid type: link [up down] end1 end2\n' )
error( 'invalid number of args: link end1 end2 [up down]\n' )
elif args[ 2 ] not in [ 'up', 'down' ]:
error( 'invalid type: link end1 end2 [up down]\n' )
else:
self.mn.link( *args )
self.mn.configLinkStatus( *args )
def do_pause( self, args ):
"Temporarily bring a node down."