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

Method batchShutdown

mininet/node.py:1305–1318  ·  view source on GitHub ↗

Shut down a list of OVS switches

( cls, switches, run=errRun )

Source from the content-addressed store, hash-verified

1303
1304 @classmethod
1305 def batchShutdown( cls, switches, run=errRun ):
1306 "Shut down a list of OVS switches"
1307 delcmd = 'del-br %s'
1308 if switches and not switches[ 0 ].isOldOVS():
1309 delcmd = '--if-exists ' + delcmd
1310 # First, delete them all from ovsdb
1311 run( 'ovs-vsctl ' +
1312 ' -- '.join( delcmd % s for s in switches ) )
1313 # Next, shut down all of the processes
1314 pids = ' '.join( str( switch.pid ) for switch in switches )
1315 run( 'kill -HUP ' + pids )
1316 for switch in switches:
1317 switch.terminate()
1318 return switches
1319
1320
1321OVSKernelSwitch = OVSSwitch

Callers 1

stopMethod · 0.45

Calls 3

runFunction · 0.70
isOldOVSMethod · 0.45
terminateMethod · 0.45

Tested by

no test coverage detected