pep8: Fix E121/126, continuation line indention
This commit is contained in:
+1
-1
@@ -46,7 +46,7 @@ def bwtest( cpuLimits, period_us=100000, seconds=5 ):
|
|||||||
server.cmd( 'iperf -s -p 5001 &' )
|
server.cmd( 'iperf -s -p 5001 &' )
|
||||||
waitListening( client, server, 5001 )
|
waitListening( client, server, 5001 )
|
||||||
result = client.cmd( 'iperf -yc -t %s -c %s' % (
|
result = client.cmd( 'iperf -yc -t %s -c %s' % (
|
||||||
seconds, server.IP() ) ).split( ',' )
|
seconds, server.IP() ) ).split( ',' )
|
||||||
bps = float( result[ -1 ] )
|
bps = float( result[ -1 ] )
|
||||||
server.cmdPrint( 'kill %iperf' )
|
server.cmdPrint( 'kill %iperf' )
|
||||||
net.stop()
|
net.stop()
|
||||||
|
|||||||
+5
-5
@@ -515,7 +515,7 @@ class Node( object ):
|
|||||||
intfs = ( ','.join( [ '%s:%s' % ( i.name, i.IP() )
|
intfs = ( ','.join( [ '%s:%s' % ( i.name, i.IP() )
|
||||||
for i in self.intfList() ] ) )
|
for i in self.intfList() ] ) )
|
||||||
return '<%s %s: %s pid=%s> ' % (
|
return '<%s %s: %s pid=%s> ' % (
|
||||||
self.__class__.__name__, self.name, intfs, self.pid )
|
self.__class__.__name__, self.name, intfs, self.pid )
|
||||||
|
|
||||||
def __str__( self ):
|
def __str__( self ):
|
||||||
"Abbreviated string representation"
|
"Abbreviated string representation"
|
||||||
@@ -683,7 +683,7 @@ class CPULimitedHost( Host ):
|
|||||||
# We have to do this here after we've specified
|
# We have to do this here after we've specified
|
||||||
# cpus and mems
|
# cpus and mems
|
||||||
errFail( 'cgclassify -g cpuset:/%s %s' % (
|
errFail( 'cgclassify -g cpuset:/%s %s' % (
|
||||||
self.name, self.pid ) )
|
self.name, self.pid ) )
|
||||||
|
|
||||||
def config( self, cpu=None, cores=None, **params ):
|
def config( self, cpu=None, cores=None, **params ):
|
||||||
"""cpu: desired overall system CPU fraction
|
"""cpu: desired overall system CPU fraction
|
||||||
@@ -777,7 +777,7 @@ class Switch( Node ):
|
|||||||
intfs = ( ','.join( [ '%s:%s' % ( i.name, i.IP() )
|
intfs = ( ','.join( [ '%s:%s' % ( i.name, i.IP() )
|
||||||
for i in self.intfList() ] ) )
|
for i in self.intfList() ] ) )
|
||||||
return '<%s %s: %s pid=%s> ' % (
|
return '<%s %s: %s pid=%s> ' % (
|
||||||
self.__class__.__name__, self.name, intfs, self.pid )
|
self.__class__.__name__, self.name, intfs, self.pid )
|
||||||
|
|
||||||
class UserSwitch( Switch ):
|
class UserSwitch( Switch ):
|
||||||
"User-space switch."
|
"User-space switch."
|
||||||
@@ -1021,8 +1021,8 @@ class Controller( Node ):
|
|||||||
def __repr__( self ):
|
def __repr__( self ):
|
||||||
"More informative string representation"
|
"More informative string representation"
|
||||||
return '<%s %s: %s:%s pid=%s> ' % (
|
return '<%s %s: %s:%s pid=%s> ' % (
|
||||||
self.__class__.__name__, self.name,
|
self.__class__.__name__, self.name,
|
||||||
self.IP(), self.port, self.pid )
|
self.IP(), self.port, self.pid )
|
||||||
|
|
||||||
|
|
||||||
class OVSController( Controller ):
|
class OVSController( Controller ):
|
||||||
|
|||||||
Reference in New Issue
Block a user