這段時間對於VIM有點興趣,稍微研究了一下,就順手作個筆記囉~
import com.vmware.vim25.mo.ServiceInstance; public void connectEsxServer(String Esxip, String EsxUserId, String EsxPWD) throws Exception { String EsxUrl; ServiceInstance si; EsxUrl = "https://" + Esxip+ "/sdk" si = new ServiceInstance(new URL(EsxUrl), EsxUserId, EsxPWD,true); if (si == null) { System.out.println("Host not found"); return; } }利用這個方式,便可以透過ServiceInstance 來與Esx Server建立連線
沒有留言:
張貼留言