예제 #1
0
파일: driver.py 프로젝트: PFZheng/nova
 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.")
예제 #2
0
 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.")