@Override public void markHostsAsDisconnected(long msId, long lastPing) { SearchCriteria<HostVO> sc = MsStatusSearch.create(); sc.setParameters("ms", msId); HostVO host = createForUpdate(); host.setLastPinged(lastPing); host.setDisconnectedOn(new Date()); UpdateBuilder ub = getUpdateBuilder(host); ub.set(host, "status", Status.Disconnected); update(ub, sc, null); sc = MsStatusSearch.create(); sc.setParameters("ms", msId); host = createForUpdate(); host.setManagementServerId(null); host.setLastPinged(lastPing); host.setDisconnectedOn(new Date()); ub = getUpdateBuilder(host); update(ub, sc, null); }
if (answer != null && answer.getResult() && answer instanceof SetupAnswer) { host.setSetup(true); host.setLastPinged((System.currentTimeMillis() >> 10) - 5 * 60); host.setHypervisorVersion(prodVersion); _hostDao.update(host.getId(), host);
host.setSetup(true); host.setLastPinged((System.currentTimeMillis() >> 10) - 5 * 60); _hostDao.update(host.getId(), host); if (answer.needReconnect()) {
host.setLastPinged(0); // so that scan task can pick it up _hostDao.update(host.getId(), host);
host.setManagementServerId(_nodeId); host.setStorageUrl(startup.getIqn()); host.setLastPinged(System.currentTimeMillis() >> 10); host.setHostTags(hostTags); host.setDetails(details);
host.setType(type); host.setStorageUrl(startup.getIqn()); host.setLastPinged(System.currentTimeMillis() >> 10); host.setCaps(null); host.setCpus(null);