/** * works only for vCenter, this grants us a ticket to access a ESX host controlled by our vCenter * * @return a valid ticket to use for login * @see com.vmware.vim25.HostServiceTicket */ public HostServiceTicket ticket() { getHost.vCenterCheck(); // die if not connected to a vCenter server HostServiceTicket ticket = null; try { ticket = connection.connect().getVimPort().acquireCimServicesTicket(getHost.byName(cimHostname)); } catch (Throwable t) { throw new GetCimRuntimeFault(t); } return ticket; }
/** * Only appropriate for direct connections to ESX hosts * * @param connection */ public GetCim(final Connection connection) { this(connection, connection.getHost(), new GetHost(connection)); }