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
@@ -511,11 +511,11 @@ class Mininet( object ):
"Run iperf UDP test."
return self.iperf( l4Type='UDP', udpBw=udpBw )
def link( self, status, src, dst ):
"""Change link status.
status: string {up, down}
src: string
dst: string"""
def configLinkStatus( self, src, dst, status ):
"""Change status of src <-> dst links.
src: node name
dst: node name
status: string {up, down}"""
if src not in self.nameToNode:
error( 'src not in network: %s\n' % src )
elif dst not in self.nameToNode: