private boolean checkIfHostIsDedicated(HostVO host) { long hostId = host.getId(); DedicatedResourceVO dedicatedHost = _dedicatedDao.findByHostId(hostId); DedicatedResourceVO dedicatedClusterOfHost = _dedicatedDao.findByClusterId(host.getClusterId()); DedicatedResourceVO dedicatedPodOfHost = _dedicatedDao.findByPodId(host.getPodId()); if (dedicatedHost != null || dedicatedClusterOfHost != null || dedicatedPodOfHost != null) { return true; } else { return false; } }
private Long accountOfDedicatedHost(HostVO host) { long hostId = host.getId(); DedicatedResourceVO dedicatedHost = _dedicatedDao.findByHostId(hostId); DedicatedResourceVO dedicatedClusterOfHost = _dedicatedDao.findByClusterId(host.getClusterId()); DedicatedResourceVO dedicatedPodOfHost = _dedicatedDao.findByPodId(host.getPodId()); if (dedicatedHost != null) { return dedicatedHost.getAccountId(); } if (dedicatedClusterOfHost != null) { return dedicatedClusterOfHost.getAccountId(); } if (dedicatedPodOfHost != null) { return dedicatedPodOfHost.getAccountId(); } return null; }
private Long domainOfDedicatedHost(HostVO host) { long hostId = host.getId(); DedicatedResourceVO dedicatedHost = _dedicatedDao.findByHostId(hostId); DedicatedResourceVO dedicatedClusterOfHost = _dedicatedDao.findByClusterId(host.getClusterId()); DedicatedResourceVO dedicatedPodOfHost = _dedicatedDao.findByPodId(host.getPodId()); if (dedicatedHost != null) { return dedicatedHost.getDomainId(); } if (dedicatedClusterOfHost != null) { return dedicatedClusterOfHost.getDomainId(); } if (dedicatedPodOfHost != null) { return dedicatedPodOfHost.getDomainId(); } return null; }
resource = _dedicatedDao.findByHostId(hostId);
List<DedicatedResourceVO> hostsToRelease = new ArrayList<DedicatedResourceVO>(); for (HostVO host : hosts) { DedicatedResourceVO dHost = _dedicatedDao.findByHostId(host.getId()); if (dHost != null) { if (!(childDomainIds.contains(dHost.getDomainId()))) {
DedicatedResourceVO dHost = _dedicatedDao.findByHostId(host.getId()); if (dHost != null) { if (!(childDomainIds.contains(dHost.getDomainId()))) {
DedicatedResourceVO dHost = _dedicatedDao.findByHostId(host.getId()); if (dHost != null) { if (!(getDomainChildIds(domainId).contains(dHost.getDomainId()))) {
DedicatedResourceVO dedicatedHost = _dedicatedDao.findByHostId(hostId); DedicatedResourceVO dedicatedClusterOfHost = _dedicatedDao.findByClusterId(host.getClusterId()); DedicatedResourceVO dedicatedPodOfHost = _dedicatedDao.findByPodId(host.getPodId());
DedicatedResourceVO dHost = _dedicatedDao.findByHostId(host.getId()); if (dHost != null && !dedicatedResources.contains(dHost)) { avoidList.addHost(host.getId()); DedicatedResourceVO dHost = _dedicatedDao.findByHostId(host.getId()); if (dHost != null && !dedicatedResources.contains(dHost)) { avoidList.addHost(host.getId()); DedicatedResourceVO dHost = _dedicatedDao.findByHostId(host.getId()); if (dHost != null && !dedicatedResources.contains(dHost)) { avoidList.addHost(host.getId());
_capacityDao.remove(hostCapacitySC); final DedicatedResourceVO dr = _dedicatedDao.findByHostId(hostId); if (dr != null) { _dedicatedDao.remove(dr.getId());