VmwareContext context = getServiceContext();
VmwareHypervisorHost hyperHost = getHyperHost(context);
HostStatsEntry hostStats = new HostStatsEntry(cmd.getHostId(), 0, 0, 0, "host", 0, 0, 0, 0);
Answer answer = new GetHostStatsAnswer(cmd, hostStats);
try {
HostStatsEntry entry = getHyperHostStats(hyperHost);
if(entry != null) {
entry.setHostId(cmd.getHostId());
answer = new GetHostStatsAnswer(cmd, entry);
}
} catch (Exception e) {
if (e instanceof RemoteException) {
s_logger.warn("Encounter remote exception to vCenter, invalidate VMware session context");
invalidateServiceContext();