Skip to content

Commit 5a530af

Browse files
committed
Remove trailing whitespace. ;-/
1 parent 3c9f5ad commit 5a530af

34 files changed

Lines changed: 85 additions & 87 deletions

bin/mn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class MininetRunner( object ):
145145
else:
146146
# Accept a comma-separated list of filenames
147147
files += value.split(',')
148-
148+
149149
for fileName in files:
150150
customs = {}
151151
if os.path.isfile( fileName ):
@@ -289,7 +289,7 @@ class MininetRunner( object ):
289289
else:
290290
raise Exception( "Could not find a default controller for switch %s" %
291291
self.options.switch )
292-
292+
293293
topo = buildTopo( TOPOS, self.options.topo )
294294
switch = customConstructor( SWITCHES, self.options.switch )
295295
host = customConstructor( HOSTS, self.options.host )

examples/bind.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
directories to be made private. A tmpfs will then be mounted on them.
2323
2424
You may use both temporary and persistent directories at the same
25-
time. In the following privateDirs string, each host will have a
25+
time. In the following privateDirs string, each host will have a
2626
persistent directory in the root filesystem at
2727
"/tmp/(hostname)/var/run" mounted on "/var/run". Each host will also
2828
have a temporary private directory mounted on "/var/log".
@@ -48,8 +48,8 @@
4848
def testHostWithPrivateDirs():
4949
"Test bind mounts"
5050
topo = SingleSwitchTopo( 10 )
51-
privateDirs = [ ( '/var/log', '/tmp/%(name)s/var/log' ),
52-
( '/var/run', '/tmp/%(name)s/var/run' ),
51+
privateDirs = [ ( '/var/log', '/tmp/%(name)s/var/log' ),
52+
( '/var/run', '/tmp/%(name)s/var/run' ),
5353
'/var/mn' ]
5454
host = partial( Host,
5555
privateDirs=privateDirs )
@@ -65,5 +65,3 @@ def testHostWithPrivateDirs():
6565
setLogLevel( 'info' )
6666
testHostWithPrivateDirs()
6767
info( 'Done.\n')
68-
69-

examples/cluster.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def moveIntf( intf, node, printError=True ):
346346
' not successfully moved to ' + node.name + '\n' )
347347
return False
348348
return True
349-
349+
350350
def makeTunnel( self, node1, node2, intfname1, intfname2,
351351
addr1=None, addr2=None ):
352352
"Make a tunnel across switches on different servers"
@@ -380,7 +380,7 @@ def makeTunnel( self, node1, node2, intfname1, intfname2,
380380
if ch != '@':
381381
error( 'makeTunnel:\n',
382382
'Tunnel setup failed for',
383-
'%s:%s' % ( node1, node1.dest ), 'to',
383+
'%s:%s' % ( node1, node1.dest ), 'to',
384384
'%s:%s\n' % ( node2, node2.dest ),
385385
'command was:', cmd, '\n' )
386386
tunnel.terminate()
@@ -421,7 +421,7 @@ def status( self ):
421421

422422
class Placer( object ):
423423
"Node placement algorithm for MininetCluster"
424-
424+
425425
def __init__( self, servers=None, nodes=None, hosts=None,
426426
switches=None, controllers=None, links=None ):
427427
"""Initialize placement object
@@ -459,7 +459,7 @@ class RoundRobinPlacer( Placer ):
459459
"""Round-robin placement
460460
Note this will usually result in cross-server links between
461461
hosts and switches"""
462-
462+
463463
def __init__( self, *args, **kwargs ):
464464
Placer.__init__( self, *args, **kwargs )
465465
self.next = 0
@@ -560,7 +560,7 @@ def __init__( self, *args, **kwargs ):
560560
self.sset = frozenset( self.switches )
561561
self.cset = frozenset( self.controllers )
562562
self.hind, self.sind, self.cind = 0, 0, 0
563-
563+
564564
def place( self, nodename ):
565565
"""Simple placement algorithm:
566566
place nodes into evenly sized bins"""

examples/clusterSanity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
def clusterSanity():
1313
"Sanity check for cluster mode"
1414
topo = SingleSwitchTopo()
15-
net = MininetCluster( topo=topo )
15+
net = MininetCluster( topo=topo )
1616
net.start()
1717
CLI( net )
1818
net.stop()

examples/clustercli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def colorsFor( seq ):
2222
colors = colors * reps
2323
colors = colors[ 0 : slen ]
2424
return colors
25-
25+
2626
def do_plot( self, line ):
2727
"Plot topology colored by node placement"
2828
# Import networkx if needed

examples/controlnet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def checkListening( self ):
3535
class MininetFacade( object ):
3636
"""Mininet object facade that allows a single CLI to
3737
talk to one or more networks"""
38-
38+
3939
def __init__( self, net, *args, **kwargs ):
4040
"""Create MininetFacade object.
4141
net: Primary Mininet object
@@ -114,7 +114,7 @@ def __init__( self, n, dataController=DataController, **kwargs ):
114114

115115
def run():
116116
"Create control and data networks, and invoke the CLI"
117-
117+
118118
info( '* Creating Control Network\n' )
119119
ctopo = ControlNetwork( n=4, dataController=DataController )
120120
cnet = Mininet( topo=ctopo, ipBase='192.168.123.0/24', controller=None )

examples/intfoptions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def intfOptions():
2121
link1 = net.addLink( h1, s1, cls=TCLink )
2222
net.addLink( h2, s1 )
2323
net.start()
24-
24+
2525
# flush out latency from reactive forwarding delay
2626
net.pingAll()
2727

@@ -34,12 +34,12 @@ def intfOptions():
3434
link1.intf1.config( loss=50 )
3535
info( '\n' )
3636
net.iperf( ( h1, h2 ), l4Type='UDP' )
37-
37+
3838
info( '\n*** Configuring one intf with delay of 15ms\n' )
3939
link1.intf1.config( delay='15ms' )
4040
info( '\n*** Run a ping to confirm delay\n' )
4141
net.pingPairFull()
42-
42+
4343
info( '\n*** Done testing\n' )
4444
net.stop()
4545

examples/linuxrouter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
"""
44
linuxrouter.py: Example network with Linux IP router
5-
5+
66
This example converts a Node into a router using IP forwarding
77
already built into Linux.
88
@@ -16,7 +16,7 @@
1616
- h2 (IP: 172.16.0.100)
1717
- h3 (IP: 10.0.0.100)
1818
19-
Routing entries can be added to the routing tables of the
19+
Routing entries can be added to the routing tables of the
2020
hosts or router using the "ip route add" or "route add" command.
2121
See the man pages for more details.
2222

examples/miniedit.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ def apply(self):
750750
'please either specify a DPID or use a '
751751
'canonical switch name such as s23.' )
752752

753-
753+
754754
results = {'externalInterfaces':externalInterfaces,
755755
'hostname':self.hostnameEntry.get(),
756756
'dpid':dpid,
@@ -784,10 +784,10 @@ class VerticalScrolledTable(LabelFrame):
784784
* Use the 'interior' attribute to place widgets inside the scrollable frame
785785
* Construct and pack/place/grid normally
786786
* This frame only allows vertical scrolling
787-
787+
788788
"""
789789
def __init__(self, parent, rows=2, columns=2, title=None, *args, **kw):
790-
LabelFrame.__init__(self, parent, text=title, padx=5, pady=5, *args, **kw)
790+
LabelFrame.__init__(self, parent, text=title, padx=5, pady=5, *args, **kw)
791791

792792
# create a canvas object and a vertical scrollbar for scrolling it
793793
vscrollbar = Scrollbar(self, orient=VERTICAL)
@@ -1709,7 +1709,7 @@ def exportScript( self ):
17091709
for widget in self.widgetToItem:
17101710
name = widget[ 'text' ]
17111711
tags = self.canvas.gettags( self.widgetToItem[ widget ] )
1712-
1712+
17131713
if 'Controller' in tags:
17141714
opts = self.controllers[name]
17151715
controllerType = opts['controllerType']
@@ -1720,9 +1720,9 @@ def exportScript( self ):
17201720
controllerIP = opts['remoteIP']
17211721
controllerPort = opts['remotePort']
17221722

1723-
1723+
17241724
f.write(" "+name+"=net.addController(name='"+name+"',\n")
1725-
1725+
17261726
if controllerType == 'remote':
17271727
f.write(" controller=RemoteController,\n")
17281728
f.write(" ip='"+controllerIP+"',\n")
@@ -1733,7 +1733,7 @@ def exportScript( self ):
17331733
f.write(" controller=OVSController,\n")
17341734
else:
17351735
f.write(" controller=Controller,\n")
1736-
1736+
17371737
f.write(" protocol='"+controllerProtocol+"',\n")
17381738
f.write(" port="+str(controllerPort)+")\n")
17391739
f.write("\n")
@@ -1943,7 +1943,7 @@ def exportScript( self ):
19431943
for widget in self.widgetToItem:
19441944
name = widget[ 'text' ]
19451945
tags = self.canvas.gettags( self.widgetToItem[ widget ] )
1946-
1946+
19471947
if 'Switch' in tags:
19481948
opts = self.switchOpts[name]
19491949
if 'netflow' in opts:
@@ -1967,7 +1967,7 @@ def exportScript( self ):
19671967
for widget in self.widgetToItem:
19681968
name = widget[ 'text' ]
19691969
tags = self.canvas.gettags( self.widgetToItem[ widget ] )
1970-
1970+
19711971
if 'Switch' in tags:
19721972
opts = self.switchOpts[name]
19731973
if 'sflow' in opts:
@@ -2641,7 +2641,7 @@ def deleteLink( self, link ):
26412641
else:
26422642
controllerName = dest[ 'text' ]
26432643
switchName = source[ 'text' ]
2644-
2644+
26452645
if controllerName in self.switchOpts[switchName]['controllers']:
26462646
self.switchOpts[switchName]['controllers'].remove(controllerName)
26472647

@@ -2662,7 +2662,7 @@ def deleteNode( self, item ):
26622662
if 'Switch' in tags:
26632663
if widget['text'] in self.switchOpts[name]['controllers']:
26642664
self.switchOpts[name]['controllers'].remove(widget['text'])
2665-
2665+
26662666
for link in widget.links.values():
26672667
# Delete from view and model
26682668
self.deleteItem( link )
@@ -2917,7 +2917,7 @@ def postStartSetup( self ):
29172917
for widget in self.widgetToItem:
29182918
name = widget[ 'text' ]
29192919
tags = self.canvas.gettags( self.widgetToItem[ widget ] )
2920-
2920+
29212921
if 'Switch' in tags:
29222922
opts = self.switchOpts[name]
29232923
if 'netflow' in opts:
@@ -2947,7 +2947,7 @@ def postStartSetup( self ):
29472947
for widget in self.widgetToItem:
29482948
name = widget[ 'text' ]
29492949
tags = self.canvas.gettags( self.widgetToItem[ widget ] )
2950-
2950+
29512951
if 'Switch' in tags:
29522952
opts = self.switchOpts[name]
29532953
if 'sflow' in opts:

examples/multilink.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
from mininet.log import setLogLevel
1010
from mininet.net import Mininet
1111
from mininet.topo import Topo
12-
12+
1313
def runMultiLink():
14-
14+
1515
topo = simpleMultiLinkTopo( n=2 )
1616
net = Mininet( topo=topo )
1717
net.start()
@@ -25,7 +25,7 @@ def __init__( self, n, **kwargs ):
2525

2626
h1, h2 = self.addHost( 'h1' ), self.addHost( 'h2' )
2727
s1 = self.addSwitch( 's1' )
28-
28+
2929
for _ in range( n ):
3030
self.addLink( s1, h1 )
3131
self.addLink( s1, h2 )

0 commit comments

Comments
 (0)