Pass codecheck.
This commit is contained in:
@@ -52,4 +52,3 @@ def cleanup():
|
||||
sh( "ip link del " + link )
|
||||
|
||||
info( "*** Cleanup complete.\n" )
|
||||
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@ class CLI( Cmd ):
|
||||
output( switch.name, '<->' )
|
||||
for intf in switch.intfs.values():
|
||||
# Ugly, but pylint wants it
|
||||
name = switch.connection.get( intf,
|
||||
name = switch.connection.get( intf,
|
||||
( None, 'Unknown ' ) )[ 1 ]
|
||||
output( ' %s' % name )
|
||||
output( '\n' )
|
||||
|
||||
@@ -147,7 +147,6 @@ class Mininet( object ):
|
||||
if topo and build:
|
||||
self.build()
|
||||
|
||||
|
||||
def addHost( self, name, mac=None, ip=None ):
|
||||
"""Add host.
|
||||
name: name of host to add
|
||||
|
||||
+6
-6
@@ -437,7 +437,7 @@ class UserSwitch( Switch ):
|
||||
if self.inNamespace:
|
||||
intfs = intfs[ :-1 ]
|
||||
self.cmd( 'ofdatapath -i ' + ','.join( intfs ) +
|
||||
' punix:/tmp/' + self.name +
|
||||
' punix:/tmp/' + self.name +
|
||||
' 1> ' + ofdlog + ' 2> ' + ofdlog + ' &' )
|
||||
self.cmd( 'ofprotocol unix:/tmp/' + self.name +
|
||||
' tcp:' + controller.IP() + ' --fail=closed ' + self.opts +
|
||||
@@ -486,11 +486,11 @@ class KernelSwitch( Switch ):
|
||||
raise Exception( 'only contiguous, zero-indexed port ranges'
|
||||
'supported: %s' % ports )
|
||||
intfs = [ self.intfs[ port ] for port in ports ]
|
||||
self.cmd( 'dpctl', 'addif', self.dp, ' '.join( intfs ) )
|
||||
self.cmd( 'dpctl', 'addif', self.dp, ' '.join( intfs ) )
|
||||
# Run protocol daemon
|
||||
controller = controllers[ 0 ]
|
||||
self.cmd( 'ofprotocol ' + self.dp +
|
||||
' tcp:%s:%d' % ( controller.IP(), controller.port ) +
|
||||
' tcp:%s:%d' % ( controller.IP(), controller.port ) +
|
||||
' --fail=closed ' + self.opts +
|
||||
' 1> ' + ofplog + ' 2>' + ofplog + ' &' )
|
||||
self.execed = False
|
||||
@@ -540,11 +540,11 @@ class OVSKernelSwitch( Switch ):
|
||||
raise Exception( 'only contiguous, zero-indexed port ranges'
|
||||
'supported: %s' % self.intfs )
|
||||
intfs = [ self.intfs[ port ] for port in ports ]
|
||||
self.cmd( 'ovs-dpctl', 'add-if', self.dp, ' '.join( intfs ) )
|
||||
self.cmd( 'ovs-dpctl', 'add-if', self.dp, ' '.join( intfs ) )
|
||||
# Run protocol daemon
|
||||
controller = controllers[ 0 ]
|
||||
self.cmd( 'ovs-openflowd ' + self.dp +
|
||||
' tcp:%s:%i' % ( controller.IP(), controller.port ) +
|
||||
' tcp:%s:%i' % ( controller.IP(), controller.port ) +
|
||||
' --fail=closed ' + self.opts +
|
||||
' 1>' + ofplog + ' 2>' + ofplog + '&' )
|
||||
self.execed = False
|
||||
@@ -577,7 +577,7 @@ class Controller( Node ):
|
||||
if self.cdir is not None:
|
||||
self.cmd( 'cd ' + self.cdir )
|
||||
self.cmd( self.controller + ' ' + self.cargs +
|
||||
' 1>' + cout + ' 2>' + cout + '&' )
|
||||
' 1>' + cout + ' 2>' + cout + '&' )
|
||||
self.execed = False
|
||||
|
||||
def stop( self ):
|
||||
|
||||
@@ -58,4 +58,3 @@ def makeTerms( nodes, title='Node', term='xterm' ):
|
||||
title: base title for each
|
||||
returns: list of created terminal processes"""
|
||||
return [ makeTerm( node, title, term ) for node in nodes ]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user