def cleanup_host(self, host): # NOTE(hartsocks): we lean on the init_host to force the vim object # to not be None. vim = self._session.vim service_content = vim.get_service_content() session_manager = service_content.sessionManager try: vim.client.service.Logout(session_manager) except suds.WebFault: LOG.debug("No vSphere session was open during cleanup_host.")