Example #1
0
 def cleanup(self):
     """Clean up, then unmount bind mounts
        unmount: actually unmount bind mounts?"""
     # Wait for process to actually terminate
     self.shell.wait()
     Host.cleanup(self)
     if self.unmount:
         self.unmountBindMounts()
         errFail('rmdir ' + self.root)
 def cleanup( self ):
     """Clean up, then unmount bind mounts
        unmount: actually unmount bind mounts?"""
     # Wait for process to actually terminate
     self.shell.wait()
     Host.cleanup( self )
     if self.unmount:
         self.unmountBindMounts()
         errFail( 'rmdir ' + self.root )
Example #3
0
    def cleanup(self):
        def remove_if_exists(filename):
            if os.path.exists(filename):
                os.remove(filename)

        Host.cleanup(self)
        # Rm dir
        if os.path.exists(self.dir):
            shutil.rmtree(self.dir)

        remove_if_exists(BASEDIR + self.name + "/zebra.pid")
        remove_if_exists(BASEDIR + self.name + "/zebra.log")
        remove_if_exists(BASEDIR + self.name + "/zebra.sock")
        remove_if_exists(BASEDIR + self.name + "/ospfd.pid")
        remove_if_exists(BASEDIR + self.name + "/ospfd.log")
        remove_if_exists(OUTPUT_PID_TABLE_FILE)
Example #4
0
    def cleanup(self):
        Host.cleanup(self)
        # Rm dir
        if os.path.exists(self.dir):
            shutil.rmtree(self.dir)

        if os.path.exists(BASEDIR+self.name+"/zebra.pid"):
            os.remove(BASEDIR+self.name+"/zebra.pid")

        if os.path.exists(BASEDIR+self.name+"/zebra.log"):
            os.remove(BASEDIR+self.name+"/zebra.log")

        if os.path.exists(BASEDIR+self.name+"/zebra.sock"):
            os.remove(BASEDIR+self.name+"/zebra.sock")

        if os.path.exists(BASEDIR+self.name+"/ospfd.pid"):
            os.remove(BASEDIR+self.name+"/ospfd.pid")

        if os.path.exists(BASEDIR+self.name+"/ospfd.log"):
            os.remove(BASEDIR+self.name+"/ospfd.log")
 def cleanup(self):
   Host.cleanup(self)
   # Rm dir
   if os.path.exists(self.dir):
     shutil.rmtree(self.dir)
Example #6
0
    def cleanup(self):
        Host.cleanup(self)

        if self._detach_screen:
            quietRun('screen -S mininet.%s -X quit' % self.name)