def __RetrieveContent(host, port, adapter, version, path, keyFile, certFile, thumbprint, sslContext, connectionPoolTimeout=CONNECTION_POOL_IDLE_TIMEOUT_SEC):
 if (adapter != 'SOAP'):
  raise ValueError(adapter)
 stub = SoapStubAdapter(host, port, version=version, path=path, certKeyFile=keyFile, certFile=certFile, thumbprint=thumbprint, sslContext=sslContext, connectionPoolTimeout=connectionPoolTimeout)
 si = vim.ServiceInstance('ServiceInstance', stub)
 content = None
 try:
  content = si.RetrieveContent()
 except vmodl.MethodFault:
  raise
 except Exception as e:
  (type, value, traceback) = sys.exc_info()
  if traceback:
   fault = vim.fault.HostConnectFault(msg=str(e))
   reraise(vim.fault.HostConnectFault, fault, traceback)
  else:
   raise vim.fault.HostConnectFault(msg=str(e))
 return (content, si, stub)

def __RetrieveContent ( host , port , adapter , version , path , keyFile , certFile , thumbprint , sslContext , connectionPoolTimeout = CONNECTION_POOL_IDLE_TIMEOUT_SEC ) : if ( adapter != 'SOAP' ) : raise ValueError ( adapter ) stub = SoapStubAdapter ( host , port , version = version , path = path , certKeyFile = keyFile , certFile = certFile , thumbprint = thumbprint , sslContext = sslContext , connectionPoolTimeout = connectionPoolTimeout ) si = vim . ServiceInstance ( 'ServiceInstance' , stub ) content = None try : content = si . RetrieveContent ( ) except vmodl . MethodFault : raise except Exception as e : ( type , value , traceback ) = sys . exc_info ( ) if traceback : fault = vim . fault . HostConnectFault ( msg = str ( e ) ) reraise ( vim . fault . HostConnectFault , fault , traceback ) else : raise vim . fault . HostConnectFault ( msg = str ( e ) ) return ( content , si , stub )
retrieve service instance for connection .