Skip to content
Snippets Groups Projects
Commit ce67093a authored by Bob Lantz's avatar Bob Lantz
Browse files

Minor format tweaks.

parent 15b482e3
No related branches found
No related tags found
No related merge requests found
...@@ -23,6 +23,7 @@ def sh( cmd ): ...@@ -23,6 +23,7 @@ def sh( cmd ):
def cleanup(): def cleanup():
"""Clean up junk which might be left over from old runs; """Clean up junk which might be left over from old runs;
do fast stuff before slow dp and link removal!""" do fast stuff before slow dp and link removal!"""
info("*** Removing excess controllers/ofprotocols/ofdatapaths/pings/noxes" info("*** Removing excess controllers/ofprotocols/ofdatapaths/pings/noxes"
"\n") "\n")
zombies = 'controller ofprotocol ofdatapath ping nox_core lt-nox_core ' zombies = 'controller ofprotocol ofdatapath ping nox_core lt-nox_core '
...@@ -32,22 +33,23 @@ def cleanup(): ...@@ -32,22 +33,23 @@ def cleanup():
# you can't connect to them either, so they're mostly harmless. # you can't connect to them either, so they're mostly harmless.
sh( 'killall -9 ' + zombies + ' 2> /dev/null' ) sh( 'killall -9 ' + zombies + ' 2> /dev/null' )
info("*** Removing junk from /tmp\n") info( "*** Removing junk from /tmp\n" )
sh( 'rm -f /tmp/vconn* /tmp/vlogs* /tmp/*.out /tmp/*.log' ) sh( 'rm -f /tmp/vconn* /tmp/vlogs* /tmp/*.out /tmp/*.log' )
info("*** Removing old screen sessions") info( "*** Removing old screen sessions\n" )
cleanUpScreens() cleanUpScreens()
info("*** Removing excess kernel datapaths\n") info( "*** Removing excess kernel datapaths\n" )
dps = sh( "ps ax | egrep -o 'dp[0-9]+' | sed 's/dp/nl:/'" ).split( '\n' ) dps = sh( "ps ax | egrep -o 'dp[0-9]+' | sed 's/dp/nl:/'" ).split( '\n' )
for dp in dps: for dp in dps:
if dp != '': if dp != '':
sh( 'dpctl deldp ' + dp ) sh( 'dpctl deldp ' + dp )
info("*** Removing all links of the pattern foo-ethX\n") info( "*** Removing all links of the pattern foo-ethX\n" )
links = sh( "ip link show | egrep -o '(\w+-eth\w+)'" ).split( '\n' ) links = sh( "ip link show | egrep -o '(\w+-eth\w+)'" ).split( '\n' )
for link in links: for link in links:
if link != '': if link != '':
sh( "ip link del " + link ) sh( "ip link del " + link )
info("*** Cleanup complete.\n") info( "*** Cleanup complete.\n" )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment