Ejemplo n.º 1
0
 def connect_ticket(self, host, ticket):
     if ticket:
         try:
             stub = connect.SoapStubAdapter(host, HOSTD_PORT, VIM_NAMESPACE)
             self._si = vim.ServiceInstance("ServiceInstance", stub)
             self._si.RetrieveContent().sessionManager.CloneSession(ticket)
             self._post_connect()
         except httplib.HTTPException as http_exception:
             self._logger.info("Failed to login hostd with ticket: %s" % http_exception)
             raise AcquireCredentialsException(http_exception)
Ejemplo n.º 2
0
 def _service_instance(self):
     stub = connect.SoapStubAdapter("localhost", HOSTD_PORT)
     return vim.ServiceInstance("ServiceInstance", stub)