Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 219257

Re: vCACCAFEHost.getHostWithCredentials problem

$
0
0

Hi,

 

vCACCAFEHost is not a scripting singleton so you cannot directly call methods like getHostWithCreadentials(...) on it. You first need to obtain an instance of vCACCAFEHost and then call the method using the instance object.

 

Here is some sample code that uses vCACCAFEEntitiesFinder scripting singleton to get host instance by its ID. Note this is not the only way to obtain vCACCAFEHost instance; you can use for example vCACCAFEHostManager.addHost(...), or other methods.

 

var hostInstance = vCACCAFEEntitiesFinder.getHost(hostId); // get the instance of the existing host but its ID
host = hostInstance.getHostWithCredentials(Username,Password); // then, you can call the instance method

Viewing all articles
Browse latest Browse all 219257

Trending Articles