'Clears out the temporary ssh known_hosts file.
This is useful if the test SSHes to the machine, then reinstalls it,
then SSHes to it again.  It can be called after the reinstall to
reduce the spam in the logs.'

def clear_known_hosts(self):

    logging.info("Clearing    known    hosts    for    host    '%s',    file    '%s'.", self.hostname, self.known_hosts_file)
    fh = open(self.known_hosts_file, 'w')
    fh.close()
