public static Host getHostFromContainer(ObjectManager objectManager, Instance instance, String hostKind) { Host found = null; for (Host host : objectManager.mappedChildren(instance, Host.class)) { found = host; } if (found != null) { found = ApiUtils.getPolicy().authorizeObject(found); } if (found == null) { return null; } if (hostKind != null && !hostKind.equals(found.getKind())) { return null; } return found; }
boolean project = false; if (original instanceof Host && DockerHostConstants.KIND_DOCKER.equals(((Host) original).getKind())) { add = true; hostStats = true;
protected void reconcileHostEndpointsImpl(final Host host) { final List<PublicEndpoint> newData = instanceDao.getPublicEndpoints(host.getAccountId(), null, host.getId()); if (host != null && host.getRemoved() == null) { updateObjectEndPoints(host, host.getKind(), host.getId(), host.getAccountId(), newData); } }
setName(from.getName()); setAccountId(from.getAccountId()); setKind(from.getKind()); setUuid(from.getUuid()); setDescription(from.getDescription());