public UserSession login(String userName, String password, String locale) throws InvalidLogin, InvalidLocale, RuntimeFault, RemoteException { return getVimService().login(getMOR(), userName, password, locale); }
.retrieveServiceContent(this.getServiceInstanceReference()); this.userSession = this.vimPort.login( this.serviceContent.getSessionManager(), this.username,
public ViConnection(String url, String username, char[] password, ExecutorService executor) throws MalformedURLException, RuntimeFaultFaultMsg, InvalidLocaleFaultMsg, InvalidLoginFaultMsg { proxy = ConnectionManager.getConnection(url, executor); serviceInstance = ConnectionManager.getServiceInstance(); serviceContent = proxy.retrieveServiceContent(serviceInstance); sessionManager = serviceContent.getSessionManager(); session = proxy.login(sessionManager, username, new String(password), null); }
UserSession userSession = vimPort.login(serviceContent.getSessionManager(), user, password, null); log.trace("Logged in successfully to vSphere host '{}'", server);
@SuppressWarnings("rawtypes") private void makeConnection(String url, String username, String password, boolean trustEveryone) throws RuntimeFaultFaultMsg, InvalidLocaleFaultMsg, InvalidLoginFaultMsg, KeyManagementException, NoSuchAlgorithmException { vimService = new VimService(); vimPort = vimService.getVimPort(); populateContextMap(url, username, password); if (Boolean.TRUE.equals(trustEveryone)) { DisableSecurity.trustEveryone(); } serviceContent = vimPort.retrieveServiceContent(this.getServiceInstanceReference()); userSession = vimPort.login(serviceContent.getSessionManager(), username, password, null); }