Cleanup any leftover docker containers

Change-Id: If403fe1d4be21b4621058134bf2ed5083140e382
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
index 9c85477..263a62f 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/Testcaselib.py
@@ -1622,6 +1622,10 @@
             handle.sendline( "sudo chmod -R a+rwx %s" % ( confDir ) )
             handle.expect( main.Mininet1.prompt )
             main.log.debug( handle.before + handle.after )
+            # Stop any leftover container
+            handle.sendline( "docker stop trellis_mininet" )
+            handle.expect( main.Mininet1.bashPrompt )
+            main.log.debug( handle.before )
             # Start docker container
             handle.sendline( "docker run --name trellis_mininet %s %s" % ( main.params[ 'MN_DOCKER' ][ 'args' ], main.params[ 'MN_DOCKER' ][ 'name' ] ) )
             i = handle.expect( [ main.Mininet1.bashPrompt, "Error response from daemon: Conflict. The container name" ] )