MCPcopy Create free account
hub / github.com/mininet/mininet / start

Method start

examples/miniedit.py:3017–3051  ·  view source on GitHub ↗

Start network.

( self )

Source from the content-addressed store, hash-verified

3015 CLI(self.net)
3016
3017 def start( self ):
3018 "Start network."
3019 if self.net is None:
3020 self.net = self.build()
3021
3022 # Since I am going to inject per switch controllers.
3023 # I can't call net.start(). I have to replicate what it
3024 # does and add the controller options.
3025 #self.net.start()
3026 info( '**** Starting %s controllers\n' % len( self.net.controllers ) )
3027 for controller in self.net.controllers:
3028 info( str(controller) + ' ')
3029 controller.start()
3030 info('\n')
3031 info( '**** Starting %s switches\n' % len( self.net.switches ) )
3032 #for switch in self.net.switches:
3033 # info( switch.name + ' ')
3034 # switch.start( self.net.controllers )
3035 for widget, item in self.widgetToItem.items():
3036 name = widget[ 'text' ]
3037 tags = self.canvas.gettags( item )
3038 if 'Switch' in tags:
3039 opts = self.switchOpts[name]
3040 switchControllers = []
3041 for ctrl in opts['controllers']:
3042 switchControllers.append(self.net.get(ctrl))
3043 info( name + ' ')
3044 # Figure out what controllers will manage this switch
3045 self.net.get(name).start( switchControllers )
3046 if 'LegacySwitch' in tags:
3047 self.net.get(name).start( [] )
3048 info( name + ' ')
3049 info('\n')
3050
3051 self.postStartSetup()
3052
3053 def stop( self ):
3054 "Stop network."

Callers 13

doRunMethod · 0.95
multitest.pyFile · 0.45
hwintf.pyFile · 0.45
consoles.pyFile · 0.45
clusterSanityFunction · 0.45
connectToRootNSFunction · 0.45
testRemoteSwitchesFunction · 0.45
testMininetClusterFunction · 0.45
nat.pyFile · 0.45
multiControllerNetFunction · 0.45
startMethod · 0.45
startMethod · 0.45

Calls 5

buildMethod · 0.95
postStartSetupMethod · 0.95
appendMethod · 0.80
itemsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected