adding comments and removing random access spaces
This commit is contained in:
@@ -122,6 +122,7 @@ class Intf( object ):
|
|||||||
"Return whether interface is up"
|
"Return whether interface is up"
|
||||||
if setUp:
|
if setUp:
|
||||||
cmdOutput = self.ifconfig( 'up' )
|
cmdOutput = self.ifconfig( 'up' )
|
||||||
|
# no output indicates success
|
||||||
if cmdOutput:
|
if cmdOutput:
|
||||||
error( "Error setting %s up: %s " % ( self.name, cmdOutput ) )
|
error( "Error setting %s up: %s " % ( self.name, cmdOutput ) )
|
||||||
return False
|
return False
|
||||||
|
|||||||
+1
-1
@@ -384,7 +384,7 @@ class Mininet( object ):
|
|||||||
srcPort, dstPort = topo.port( srcName, dstName )
|
srcPort, dstPort = topo.port( srcName, dstName )
|
||||||
self.addLink( src, dst, srcPort, dstPort, **params )
|
self.addLink( src, dst, srcPort, dstPort, **params )
|
||||||
info( '(%s, %s) ' % ( src.name, dst.name ) )
|
info( '(%s, %s) ' % ( src.name, dst.name ) )
|
||||||
|
|
||||||
info( '\n' )
|
info( '\n' )
|
||||||
|
|
||||||
def configureControlNetwork( self ):
|
def configureControlNetwork( self ):
|
||||||
|
|||||||
+1
-1
@@ -1190,7 +1190,7 @@ class IVSSwitch(Switch):
|
|||||||
args.append( self.opts )
|
args.append( self.opts )
|
||||||
|
|
||||||
logfile = '/tmp/ivs.%s.log' % self.name
|
logfile = '/tmp/ivs.%s.log' % self.name
|
||||||
|
|
||||||
self.cmd( ' '.join(args) + ' >' + logfile + ' 2>&1 </dev/null &' )
|
self.cmd( ' '.join(args) + ' >' + logfile + ' 2>&1 </dev/null &' )
|
||||||
|
|
||||||
def stop( self ):
|
def stop( self ):
|
||||||
|
|||||||
@@ -192,6 +192,8 @@ def moveIntfNoRetry( intf, dstNode, srcNode=None, printError=False ):
|
|||||||
cmdOutput = srcNode.cmd( cmd )
|
cmdOutput = srcNode.cmd( cmd )
|
||||||
else:
|
else:
|
||||||
cmdOutput = quietRun( cmd )
|
cmdOutput = quietRun( cmd )
|
||||||
|
# If ip link set does not produce any output, then we can assume
|
||||||
|
# that the link has been moved successfully.
|
||||||
if cmdOutput:
|
if cmdOutput:
|
||||||
if printError:
|
if printError:
|
||||||
error( '*** Error: moveIntf: ' + intf +
|
error( '*** Error: moveIntf: ' + intf +
|
||||||
|
|||||||
Reference in New Issue
Block a user