def __Login(host, port, user, pwd, service, adapter, version, path, keyFile, certFile, thumbprint, sslContext, connectionPoolTimeout=CONNECTION_POOL_IDLE_TIMEOUT_SEC):
 (content, si, stub) = __RetrieveContent(host, port, adapter, version, path, keyFile, certFile, thumbprint, sslContext, connectionPoolTimeout)
 if ((host == 'localhost') and (not pwd)):
  try:
   (user, pwd) = GetLocalTicket(si, user)
  except:
   pass
 try:
  x = content.sessionManager.Login(user, pwd, None)
 except vim.fault.InvalidLogin:
  raise
 except Exception as e:
  raise
 return (si, stub)

def __Login ( host , port , user , pwd , service , adapter , version , path , keyFile , certFile , thumbprint , sslContext , connectionPoolTimeout = CONNECTION_POOL_IDLE_TIMEOUT_SEC ) : ( content , si , stub ) = __RetrieveContent ( host , port , adapter , version , path , keyFile , certFile , thumbprint , sslContext , connectionPoolTimeout ) if ( ( host == 'localhost' ) and ( not pwd ) ) : try : ( user , pwd ) = GetLocalTicket ( si , user ) except : pass try : x = content . sessionManager . Login ( user , pwd , None ) except vim . fault . InvalidLogin : raise except Exception as e : raise return ( si , stub )
private method that performs the actual connect and returns a connected service instance object .